message stringlengths 2 44.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 276 109k | cluster float64 23 23 | __index_level_0__ int64 552 217k |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
Fair Chocolate-Cutting
You are given a flat piece of chocolate of convex polygon shape. You are to cut it into two pieces of precisely the same amount with a straight knife.
Write a program that computes, for a given convex polygon, the maximum and... | instruction | 0 | 51,247 | 23 | 102,494 |
"Correct Solution:
```
#!/usr/bin/python3
from decimal import Decimal
from fractions import Fraction
import math
import os
import sys
def main():
N = read_int()
A = [Vec(*read_ints()) for _ in range(N)]
print(*solve(N, A), sep='\n')
def solve(N, Points):
if DEBUG:
dprint('polygon({!r}, fill... | output | 1 | 51,247 | 23 | 102,495 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew n black horizontal and vertical segments p... | instruction | 0 | 51,736 | 23 | 103,472 |
No | output | 1 | 51,736 | 23 | 103,473 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew n black horizontal and vertical segments p... | instruction | 0 | 51,737 | 23 | 103,474 |
No | output | 1 | 51,737 | 23 | 103,475 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,687 | 23 | 105,374 |
Yes | output | 1 | 52,687 | 23 | 105,375 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,688 | 23 | 105,376 |
Yes | output | 1 | 52,688 | 23 | 105,377 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,689 | 23 | 105,378 |
Yes | output | 1 | 52,689 | 23 | 105,379 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,690 | 23 | 105,380 |
Yes | output | 1 | 52,690 | 23 | 105,381 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,691 | 23 | 105,382 |
No | output | 1 | 52,691 | 23 | 105,383 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,692 | 23 | 105,384 |
No | output | 1 | 52,692 | 23 | 105,385 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,693 | 23 | 105,386 |
No | output | 1 | 52,693 | 23 | 105,387 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The map of Berland is a rectangle of the size n Γ m, which consists of cells of size 1 Γ 1. Each cell is either land or water. The map is surrounded by the ocean.
Lakes are the maximal regions... | instruction | 0 | 52,694 | 23 | 105,388 |
No | output | 1 | 52,694 | 23 | 105,389 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,860 | 23 | 105,720 |
"Correct Solution:
```
s = int(input())
x = (s-1)//(10**9)+1
print(0,0,10**9,1,x*(10**9)-s,x)
``` | output | 1 | 52,860 | 23 | 105,721 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,862 | 23 | 105,724 |
"Correct Solution:
```
s = int(input())
x3 = (10**9-s%10**9)%10**9
y3 = (s+x3)//10**9
print(0, 0, 10**9, 1, x3, y3)
``` | output | 1 | 52,862 | 23 | 105,725 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,863 | 23 | 105,726 |
"Correct Solution:
```
S=int(input())
a,b=10**9,1
d=(S+a-1)//a
c=a*d-S
print(0,0,a,b,c,d)
``` | output | 1 | 52,863 | 23 | 105,727 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,864 | 23 | 105,728 |
"Correct Solution:
```
s = int(input())
print(0,0,10**9,1,10**9-(s-1)%(10**9)-1,(s-1)//(10**9)+1)
``` | output | 1 | 52,864 | 23 | 105,729 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,865 | 23 | 105,730 |
"Correct Solution:
```
S=int(input())
a=S%(10**9)
b=(10**9-a)%(10**9)
print(0,0,1,10**9,(S+b)//(10**9),b)
``` | output | 1 | 52,865 | 23 | 105,731 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,866 | 23 | 105,732 |
"Correct Solution:
```
#!/usr/bin/env python3
s = int(input())
print(10**9, 1*(s<10**18), 10**9 - s%10**9, s // 10**9 + 1*(s<10**18),0,0)
``` | output | 1 | 52,866 | 23 | 105,733 |
Provide a correct Python 3 solution for this coding contest problem.
Given is an integer S. Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:
* 0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9
* The area of the triangle in a two-dimensional plane whose vertices ar... | instruction | 0 | 52,867 | 23 | 105,734 |
"Correct Solution:
```
s,v=int(input()),10**9;y=-s%v;print(0,0,v,1,y,(s+y)//v)
``` | output | 1 | 52,867 | 23 | 105,735 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,085 | 23 | 106,170 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
n=int(input())
a=list(map(int,input().split()))
curr=0
two=0
tri=0
while curr<n:
tri+=a[curr]//3
a[curr]%=3
while two<n-1 and (a[two]<2 or two<=curr):
two+=1
if a[curr]==1:
if a[two]>=2 and two>curr:
a[c... | output | 1 | 53,085 | 23 | 106,171 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,086 | 23 | 106,172 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
n = int(input())
a = list(map(int,input().split()))
one = 0
ans = 0
for i in range(n):
for j in range(one,i+1):
if i == j:
ans += a[i]//3
a[i] %=3
break
if a[i] <= 1:
break
if a[j] <=a[i]//2:
ans += a[j]... | output | 1 | 53,086 | 23 | 106,173 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,087 | 23 | 106,174 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
from collections import defaultdict as dd
import math
def nn():
return int(input())
def li():
return list(input())
def mi():
return map(int, input().split())
def lm():
return list(map(int, input().split()))
n=nn()
tris=lm()
answer=0
ext... | output | 1 | 53,087 | 23 | 106,175 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,088 | 23 | 106,176 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
n = int(input())
l = [0] + list(map(int, input().split()))
cnt = 0
trash = 0
for i in range(1, n + 1):
if not trash:
cnt += l[i] // 3
trash += l[i] % 3
else:
trash += l[i] % 2
l[i] -= l[i] % 2
use = ... | output | 1 | 53,088 | 23 | 106,177 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,089 | 23 | 106,178 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
n = int(input())
a = list(map(int, input().split()))
c = 0
ans = 0
for x in a:
d = x // 2
add = min(d, c)
c -= add
ans += add
x -= add * 2
ans += x // 3
c += x % 3
print(ans)
``` | output | 1 | 53,089 | 23 | 106,179 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,090 | 23 | 106,180 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
n = int(input())
d = [int(x) for x in input().split()]
c = 0
ans = 0
x = 0
for i in range(n):
f = d[i] // 2
s = min(f, x)
ans += s
x -= s
d[i] -= s * 2
ans += d[i] // 3
x += d[i] % 3
print(ans)
``` | output | 1 | 53,090 | 23 | 106,181 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,091 | 23 | 106,182 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
N = int(input())
nums = [int(i) for i in input().split(' ')]
from collections import defaultdict
def helper(nums):
tot, carry = 0, 0
for i in range(len(nums)):
v = min(nums[i]//2, carry)
tot += v
carry -= v
... | output | 1 | 53,091 | 23 | 106,183 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,092 | 23 | 106,184 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
x = int(input())
a = [int(i) for i in input().split()]
a.append(0)
ans = 0
sum12 = {1:0, 2:0}
for i in range(x+1):
for j in range(1, 2):
if i>1 and sum12[j] != 0:
t = a[i] // (3-j)
t = min(sum12[j], t)
a[i] -= t * (3-j)
ans += t
... | output | 1 | 53,092 | 23 | 106,185 |
Provide tags and a correct Python 2 solution for this coding contest problem.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the maximum possible number of triangles using the... | instruction | 0 | 53,093 | 23 | 106,186 |
Tags: brute force, dp, fft, greedy, ternary search
Correct Solution:
```
from sys import stdin, stdout
from collections import Counter, defaultdict
from itertools import permutations, combinations
raw_input = stdin.readline
pr = stdout.write
def in_num():
return int(raw_input())
def in_arr():
return map(int... | output | 1 | 53,093 | 23 | 106,187 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,094 | 23 | 106,188 |
Yes | output | 1 | 53,094 | 23 | 106,189 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,095 | 23 | 106,190 |
Yes | output | 1 | 53,095 | 23 | 106,191 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,096 | 23 | 106,192 |
Yes | output | 1 | 53,096 | 23 | 106,193 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,097 | 23 | 106,194 |
Yes | output | 1 | 53,097 | 23 | 106,195 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,098 | 23 | 106,196 |
No | output | 1 | 53,098 | 23 | 106,197 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,099 | 23 | 106,198 |
No | output | 1 | 53,099 | 23 | 106,199 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,100 | 23 | 106,200 |
No | output | 1 | 53,100 | 23 | 106,201 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Pavel has several sticks with lengths equal to powers of two.
He has a_0 sticks of length 2^0 = 1, a_1 sticks of length 2^1 = 2, ..., a_{n-1} sticks of length 2^{n-1}.
Pavel wants to make the... | instruction | 0 | 53,101 | 23 | 106,202 |
No | output | 1 | 53,101 | 23 | 106,203 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,495 | 23 | 106,990 |
Tags: geometry
Correct Solution:
```
import math
ln = input().split(" ")
px = int(ln[0])
py = int(ln[1])
vx = int(ln[2])
vy = int(ln[3])
a = int(ln[4])
b = int(ln[5])
c = int(ln[6])
d = int(ln[7])
x_dir = vx / math.sqrt(vx ** 2 + vy ** 2)
y_dir = vy / math.sqrt(vx ** 2 + vy ** 2)
print(px + b * x_dir, py + b * y_di... | output | 1 | 53,495 | 23 | 106,991 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,496 | 23 | 106,992 |
Tags: geometry
Correct Solution:
```
import math
def main():
px, py, vx, vy, a, b, c, d = map(int, input().split())
vectorx = vx / math.sqrt(math.pow(vx, 2) + math.pow(vy, 2))
vectory = vy / math.sqrt(math.pow(vx, 2) + math.pow(vy, 2))
print(px + (b * vectorx), py + (b * vectory))
print(px - ((a ... | output | 1 | 53,496 | 23 | 106,993 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,497 | 23 | 106,994 |
Tags: geometry
Correct Solution:
```
import math
def main():
x, y, vx, vy, a, b, c, d = map(int, input().split())
len = math.sqrt(vx * vx + vy * vy)
vx /= len
vy /= len
print(x + vx * b, y + vy * b)
print(x - vy * a / 2, y + vx * a / 2)
print(x - vy * c / 2, y + vx * c / 2)
... | output | 1 | 53,497 | 23 | 106,995 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,498 | 23 | 106,996 |
Tags: geometry
Correct Solution:
```
from math import atan2, pi
EPS = 0.00000001
def eq(a, b):
return abs(a - b) < EPS
class Vector:
def __init__(self, x2, y2, x1=0, y1=0):
self.x = (x2 - x1)
self.y = y2 - y1
self.s = (self.x ** 2 + self.y ** 2) ** 0.5
def __add__(self, other):... | output | 1 | 53,498 | 23 | 106,997 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,499 | 23 | 106,998 |
Tags: geometry
Correct Solution:
```
# [https://codeforces.com/contest/630/submission/16304936]
import math
(px, py, vx, vy, a, b, c, d) = map(int, input().split(' '))
l = math.sqrt(vx*vx+vy*vy)
print(px+b/l*vx, py+b/l*vy)
print(px-a/2/l*vy, py+a/2/l*vx)
print(px-c/2/l*vy, py+c/2/l*vx)
print(px-c/2/l*vy-d/l*vx, py+... | output | 1 | 53,499 | 23 | 106,999 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,500 | 23 | 107,000 |
Tags: geometry
Correct Solution:
```
from decimal import *
from math import sqrt
getcontext().prec = 100
px , py , vx , vy , a , b , c , d = map (Decimal, input().split())
absv = Decimal(sqrt(vx**2 + vy**2))
n0x = vx / absv
n0y = vy / absv
n1x , n1y = n0y , -n0x
n2x , n2y = -n0x , -n0y
n3x , n3y = -n0y , n0x
print(px +... | output | 1 | 53,500 | 23 | 107,001 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,501 | 23 | 107,002 |
Tags: geometry
Correct Solution:
```
import math
px, py, vx, vy, a, b, c, d = map(int, input().split())
l = math.sqrt(vx**2 + vy**2)
gx, gy = px + ((-1 * vx * d) / l), py + ((-1 * vy * d) / l)
pts = []
pts.append([px + ((b * vx) / l), py + ((b * vy) / l)])
pts.append([px + ((-1 * (a / 2) * vy) / l), py + ((vx * (a ... | output | 1 | 53,501 | 23 | 107,003 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to cre... | instruction | 0 | 53,502 | 23 | 107,004 |
Tags: geometry
Correct Solution:
```
import math
tab=[float(i) for i in input().split()]
tabx=[0,0,0,0,0,0,0]
taby=[0,0,0,0,0,0,0]
tabx[0]=tab[0]+tab[5]*tab[2]/(math.sqrt(tab[2]**2+tab[3]**2))
taby[0]=tab[1]+tab[5]*tab[3]/(math.sqrt(tab[2]**2+tab[3]**2))
tabx[1]=tab[0]-0.5*tab[4]*tab[3]/(math.sqrt(tab[2]**2+tab[3]*... | output | 1 | 53,502 | 23 | 107,005 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,503 | 23 | 107,006 |
Yes | output | 1 | 53,503 | 23 | 107,007 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,504 | 23 | 107,008 |
Yes | output | 1 | 53,504 | 23 | 107,009 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,505 | 23 | 107,010 |
Yes | output | 1 | 53,505 | 23 | 107,011 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,506 | 23 | 107,012 |
Yes | output | 1 | 53,506 | 23 | 107,013 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,507 | 23 | 107,014 |
No | output | 1 | 53,507 | 23 | 107,015 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,508 | 23 | 107,016 |
No | output | 1 | 53,508 | 23 | 107,017 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya has recently started working as a programmer in the IT city company that develops computer games.
Besides game mechanics implementation to create a game it is necessary to create tool pro... | instruction | 0 | 53,509 | 23 | 107,018 |
No | output | 1 | 53,509 | 23 | 107,019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.