message stringlengths 2 19.9k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 322 108k | cluster float64 15 15 | __index_level_0__ int64 644 217k |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
You decide to develop a game with your friends. The title of the game is "Battle Town". This is a game with the theme of urban warfare with tanks. As the first step in game development, we decided to develop the following prototype.
In this prototyp... | instruction | 0 | 21,120 | 15 | 42,240 |
"Correct Solution:
```
t = int(input())
for i in range(t):
h, w = map(int, input().split())
mp = [list("#" + input() + "#") for _ in range(h)]
mp.insert(0, ["#"] * (w + 2))
mp.append(["#"] * (w + 2))
for y in range(h + 2):
for x in range(w + 2):
if mp[y][x] == ">":
sx, sy, sd = x, y, 0
... | output | 1 | 21,120 | 15 | 42,241 |
Provide a correct Python 3 solution for this coding contest problem.
You decide to develop a game with your friends. The title of the game is "Battle Town". This is a game with the theme of urban warfare with tanks. As the first step in game development, we decided to develop the following prototype.
In this prototyp... | instruction | 0 | 21,121 | 15 | 42,242 |
"Correct Solution:
```
T = int(input())
for i in range(T) :
H, W = map(int, input().split())
Map = []
for h in range(H) :
tmp = list(input())
Map.append(tmp)
if "^" in tmp :
Me_h = h
Me_w = tmp.index("^")
if ">" in tmp :
Me_h = h
... | output | 1 | 21,121 | 15 | 42,243 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You decide to develop a game with your friends. The title of the game is "Battle Town". This is a game with the theme of urban warfare with tanks. As the first step in game development, we decid... | instruction | 0 | 21,122 | 15 | 42,244 |
No | output | 1 | 21,122 | 15 | 42,245 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You decide to develop a game with your friends. The title of the game is "Battle Town". This is a game with the theme of urban warfare with tanks. As the first step in game development, we decid... | instruction | 0 | 21,123 | 15 | 42,246 |
No | output | 1 | 21,123 | 15 | 42,247 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You decide to develop a game with your friends. The title of the game is "Battle Town". This is a game with the theme of urban warfare with tanks. As the first step in game development, we decid... | instruction | 0 | 21,124 | 15 | 42,248 |
No | output | 1 | 21,124 | 15 | 42,249 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,213 | 15 | 42,426 |
Tags: constructive algorithms, implementation
Correct Solution:
```
import sys
import heapq
import math
lines = sys.stdin.read().splitlines()
s = [int(x) for x in lines[0]]
countVertical = 0
countHorizontal = 0
for i in s:
if i == 0:
print(2, countVertical+1)
countVertical=(countVertical+1)%4
e... | output | 1 | 21,213 | 15 | 42,427 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,214 | 15 | 42,428 |
Tags: constructive algorithms, implementation
Correct Solution:
```
s = input()
a = b = 0
for i in s:
if i == '0':
print(a + 1, 3)
a = (a + 2) % 4
else:
print(b + 1, 1)
b = (b + 1) % 4
``` | output | 1 | 21,214 | 15 | 42,429 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,215 | 15 | 42,430 |
Tags: constructive algorithms, implementation
Correct Solution:
```
s = input()
zstack = False
ostack = False
for i in s:
if i == '1':
if ostack:
print(*(4, 1))
else:
print(*(4, 3))
ostack = not ostack
else:
if zstack:
print(*(3, 1))
el... | output | 1 | 21,215 | 15 | 42,431 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,216 | 15 | 42,432 |
Tags: constructive algorithms, implementation
Correct Solution:
```
#
import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)
def getIntList():
return list(map(int, input().split()))
try :
#raise ModuleNotFoundError
import numpy
def dprint(*args, **kwargs):
#pri... | output | 1 | 21,216 | 15 | 42,433 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,217 | 15 | 42,434 |
Tags: constructive algorithms, implementation
Correct Solution:
```
from sys import stdin,stdout
from math import gcd,sqrt
from collections import deque
input=stdin.readline
R=lambda:map(int,input().split())
I=lambda:int(input())
S=lambda:input().rstrip('\n')
L=lambda:list(R())
P=lambda x:stdout.write(x)
hg=lambda x,y:... | output | 1 | 21,217 | 15 | 42,435 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,218 | 15 | 42,436 |
Tags: constructive algorithms, implementation
Correct Solution:
```
s=input()
x=0
y=0
for i in range(len(s)):
if s[i]=='0':
print(1,x%4+1)
x=x+1
else:
print(4,y%4+1)
y+=2
``` | output | 1 | 21,218 | 15 | 42,437 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,219 | 15 | 42,438 |
Tags: constructive algorithms, implementation
Correct Solution:
```
def main():
string=input()
hori=True
vert=True
for x in range(len(string)):
if string[x]=="0":
if vert:
print(3,1)
vert=False
else:
print(1,1)
... | output | 1 | 21,219 | 15 | 42,439 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in... | instruction | 0 | 21,220 | 15 | 42,440 |
Tags: constructive algorithms, implementation
Correct Solution:
```
s = input()
a = False
b = False
for ch in s:
if ch == '0':
print(3 if a else 1, 1)
a = not a
else:
print(4, 1 if b else 3)
b = not b
``` | output | 1 | 21,220 | 15 | 42,441 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,221 | 15 | 42,442 |
Yes | output | 1 | 21,221 | 15 | 42,443 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,222 | 15 | 42,444 |
Yes | output | 1 | 21,222 | 15 | 42,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,223 | 15 | 42,446 |
Yes | output | 1 | 21,223 | 15 | 42,447 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,224 | 15 | 42,448 |
Yes | output | 1 | 21,224 | 15 | 42,449 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,225 | 15 | 42,450 |
No | output | 1 | 21,225 | 15 | 42,451 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,226 | 15 | 42,452 |
No | output | 1 | 21,226 | 15 | 42,453 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,227 | 15 | 42,454 |
No | output | 1 | 21,227 | 15 | 42,455 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. Whe... | instruction | 0 | 21,228 | 15 | 42,456 |
No | output | 1 | 21,228 | 15 | 42,457 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,772 | 15 | 43,544 |
"Correct Solution:
```
X=int(input())
i=1
while True:
if X*i%360==0:
print(i)
break
i+=1
``` | output | 1 | 21,772 | 15 | 43,545 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,773 | 15 | 43,546 |
"Correct Solution:
```
X=int(input())
ans=1
temp=X
while temp%360!=0:
temp+=X
ans+=1
print(ans)
``` | output | 1 | 21,773 | 15 | 43,547 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,774 | 15 | 43,548 |
"Correct Solution:
```
n=int(input())
for i in range(1,361):
if (n*i)%360==0:
print(i);exit()
``` | output | 1 | 21,774 | 15 | 43,549 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,775 | 15 | 43,550 |
"Correct Solution:
```
from math import gcd
x = int(input())
g = gcd(x,360)
print(((360//g)*(x//g)*g)//x)
``` | output | 1 | 21,775 | 15 | 43,551 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,776 | 15 | 43,552 |
"Correct Solution:
```
x = int(input())
mul = 1
while (mul*360) % x != 0:
mul += 1
print(mul*360//x)
``` | output | 1 | 21,776 | 15 | 43,553 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,777 | 15 | 43,554 |
"Correct Solution:
```
n=int(input())
for i in range(360):
if (i*n+n)%360==0:
print(i+1)
break
``` | output | 1 | 21,777 | 15 | 43,555 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,778 | 15 | 43,556 |
"Correct Solution:
```
n=int(input())
from math import gcd
print(360//gcd(360,n))
``` | output | 1 | 21,778 | 15 | 43,557 |
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:
* Go one meter in the direction he is facing. ... | instruction | 0 | 21,779 | 15 | 43,558 |
"Correct Solution:
```
x = int(input())
b = x
a = 1
while b%360!=0:
a += 1
b += x
print(a)
``` | output | 1 | 21,779 | 15 | 43,559 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,780 | 15 | 43,560 |
Yes | output | 1 | 21,780 | 15 | 43,561 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,781 | 15 | 43,562 |
Yes | output | 1 | 21,781 | 15 | 43,563 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,782 | 15 | 43,564 |
Yes | output | 1 | 21,782 | 15 | 43,565 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,783 | 15 | 43,566 |
Yes | output | 1 | 21,783 | 15 | 43,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,784 | 15 | 43,568 |
No | output | 1 | 21,784 | 15 | 43,569 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action ... | instruction | 0 | 21,787 | 15 | 43,574 |
No | output | 1 | 21,787 | 15 | 43,575 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
There is a grid of $ R \ times C $ squares with $ (0, 0) $ in the upper left and $ (R-1, C-1) $ in the lower right. When you are in a square ($ e $, $ f $), from there $ (e + 1, f) $, $ (e-1, f) $, $ (e, f + 1) $, $ (e) , f-1) $, $ (e, 0) $,... | instruction | 0 | 21,974 | 15 | 43,948 |
"Correct Solution:
```
from collections import deque
R,C,ay,ax,by,bx = map(int,input().split())
MOD = INF = 10**9+7
dists = [[INF]*C for i in range(R)]
dists[ay][ax] = 0
ptns = [[0]*C for i in range(R)]
ptns[ay][ax] = 1
q = deque([(0,ax,ay)])
dxs = [1,0,-1,0]
dys = [0,1,0,-1]
ans_d = None
while q:
d,x,y = q.poplef... | output | 1 | 21,974 | 15 | 43,949 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is an interactive problem
You are given a grid n× n, where n is odd. Rows are enumerated from 1 to n from up to down, columns are enumerated from 1 to n from left to right. Cell, standing on the intersection of row x and column y, is d... | instruction | 0 | 22,103 | 15 | 44,206 |
Tags: implementation, interactive
Correct Solution:
```
import math
import sys
# helpful:
# r,g,b=map(int,input().split())
#list1 = input().split()
#for i in range(len(list1)):
# list1[i] = int(list1[i])
# print(list1)
# arr = [[0 for x in range(columns)] for y in range(rows)]
n = int(input())
arr = [[-1 for x in ra... | output | 1 | 22,103 | 15 | 44,207 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is an interactive problem
You are given a grid n× n, where n is odd. Rows are enumerated from 1 to n from up to down, columns are enumerated from 1 to n from left to right. Cell, standing on the intersection of row x and column y, is d... | instruction | 0 | 22,104 | 15 | 44,208 |
Tags: implementation, interactive
Correct Solution:
```
from sys import stdout
# matrix="""
# 101110111011101110111
# 011101110111011101110
# 111011101110111011101
# 110111011101110111011
# 101110111011101110111
# 011101110111011101110
# 111011101110111011101
# 110111011101110111011
# 101110111011101110111
# 011101... | output | 1 | 22,104 | 15 | 44,209 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is an interactive problem
You are given a grid n× n, where n is odd. Rows are enumerated from 1 to n from up to down, columns are enumerated from 1 to n from left to right. Cell, standing on the intersection of row x and column y, is d... | instruction | 0 | 22,105 | 15 | 44,210 |
Tags: implementation, interactive
Correct Solution:
```
#!/usr/bin/python3
import math
import sys
DEBUG = False
def inp():
return sys.stdin.readline().rstrip()
def dprint(*value, sep=' ', end='\n'):
if DEBUG:
print(*value, sep=sep, end=end)
def readi():
n = int(inp())
dprint('read', n)
... | output | 1 | 22,105 | 15 | 44,211 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,213 | 15 | 44,426 |
Tags: geometry, math
Correct Solution:
```
import re
import itertools
from collections import Counter, deque
class Task:
a, x, y = [0] * 3
answer = 0
def getData(self):
self.a, self.x, self.y = [int(x) for x in input().split(' ')]
#inFile = open('input.txt', 'r')
#inFile.readline(... | output | 1 | 22,213 | 15 | 44,427 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,214 | 15 | 44,428 |
Tags: geometry, math
Correct Solution:
```
a, x, y = map(int, input().split())
half = a / 2
if y % a == 0:
print('-1')
exit()
row_number = y // a
row_number += 1
if row_number == 1:
if x > -half and x < half:
print('1')
else:
print('-1')
else:
if row_number % 2 == 0:
if x > -... | output | 1 | 22,214 | 15 | 44,429 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,215 | 15 | 44,430 |
Tags: geometry, math
Correct Solution:
```
a,x,y=map(int,input().split())
if x==0 and y==0:
print(-1)
elif -a<x and a>x:
if y%a==0:
print(-1)
elif 2*a>y:
if -a<2*x and a>2*x:
if y>a:
print(2)
else:
print(1)
els... | output | 1 | 22,215 | 15 | 44,431 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,216 | 15 | 44,432 |
Tags: geometry, math
Correct Solution:
```
import sys
read=lambda:sys.stdin.readline().rstrip()
readi=lambda:int(sys.stdin.readline())
writeln=lambda x:sys.stdout.write(str(x)+"\n")
write=lambda x:sys.stdout.write(x)
def solve(a,x,y):
if not y % a:
return -1
if abs(x) >= a:
return -1
if y <... | output | 1 | 22,216 | 15 | 44,433 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,217 | 15 | 44,434 |
Tags: geometry, math
Correct Solution:
```
a , x , y = map(int,input().split())
if (y == 0 or abs(x) >= a or y % a == 0):
print('-1')
exit(0)
level = (y // a) + 1
ans = 0
if (level == 1):
if (abs(x) >= (a + 1) // 2 ):
ans = -1
else:
ans = 1
elif (level % 2 != 0):
oddlevels = l... | output | 1 | 22,217 | 15 | 44,435 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,218 | 15 | 44,436 |
Tags: geometry, math
Correct Solution:
```
a, x, y = map(int, input().split())
if x >= a or x <= -a or y == y//a*a or y < 0:
print(-1)
exit()
elif x == 0 and y//a % 2 == 0 and y//a != 0:
print(-1)
exit()
elif (x >= (a+1) // 2 or -x >= (a+1) // 2) and (y // a%2 == 1 or y // a == 0):
print(-1)
exit()
z = y // a
if ... | output | 1 | 22,218 | 15 | 44,437 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,219 | 15 | 44,438 |
Tags: geometry, math
Correct Solution:
```
a,x,y=map(int,input().split())
if ((x>=a)or(x<=-a)or(y==y//a*a)or(y<0)):
print(-1)
exit(0)
elif ((x==0)and(y//a%2==0)and(y//a!=0)):
print(-1)
exit(0)
elif ((x>=(a+1)//2 or -x>=(a+1)//2)and(y//a%2==1 or y//a==0)):
print(-1)
exit(0)
z=y//a
#print(z)
if (z==0):
print(1)
el... | output | 1 | 22,219 | 15 | 44,439 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game. The game field, the court, looks as is shown i... | instruction | 0 | 22,220 | 15 | 44,440 |
Tags: geometry, math
Correct Solution:
```
import sys
def minp():
return sys.stdin.readline().strip()
def mint():
return int(minp())
def mints():
return map(int,minp().split())
a,x,y = mints()
a *= 2
x *= 2
y *= 2
y -= a
if y < 0:
if y > -a and x > -a//2 and x < a//2:
print(1)
else:
print(-1)
elif y % a ==... | output | 1 | 22,220 | 15 | 44,441 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game.... | instruction | 0 | 22,221 | 15 | 44,442 |
Yes | output | 1 | 22,221 | 15 | 44,443 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game.... | instruction | 0 | 22,222 | 15 | 44,444 |
Yes | output | 1 | 22,222 | 15 | 44,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So nearly half of the winter is over and Maria is dreaming about summer. She's fed up with skates and sleds, she was dreaming about Hopscotch all night long. It's a very popular children's game.... | instruction | 0 | 22,223 | 15 | 44,446 |
Yes | output | 1 | 22,223 | 15 | 44,447 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.