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.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,573 | 23 | 35,146 |
"Correct Solution:
```
h = int(input().split()[0])
for i in range(h):
line = input()
print(line)
print(line)
``` | output | 1 | 17,573 | 23 | 35,147 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,574 | 23 | 35,148 |
"Correct Solution:
```
h,m=map(int,input().split())
a=[input()for i in range(h)]
for i in a:
print(i)
print(i)
``` | output | 1 | 17,574 | 23 | 35,149 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,575 | 23 | 35,150 |
"Correct Solution:
```
for i in range(int(input().split()[0])):
a = input()
print(a, a, sep='\n')
``` | output | 1 | 17,575 | 23 | 35,151 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,576 | 23 | 35,152 |
"Correct Solution:
```
h,w = map(int, input().split())
for _ in range(h):
row = input()
print(row)
print(row)
``` | output | 1 | 17,576 | 23 | 35,153 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,577 | 23 | 35,154 |
"Correct Solution:
```
H,W=map(int,input().split())
for i in range(H):
S=input()
print(S)
print(S)
``` | output | 1 | 17,577 | 23 | 35,155 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,578 | 23 | 35,156 |
"Correct Solution:
```
h,w=map(int,input().split())
for i in range(h):
s=input()
print(s+'\n'+s)
``` | output | 1 | 17,578 | 23 | 35,157 |
Provide a correct Python 3 solution for this coding contest problem.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.
... | instruction | 0 | 17,579 | 23 | 35,158 |
"Correct Solution:
```
h, w = [int(i) for i in input().split()]
for hi in range(h):
s = input()
print(s)
print(s)
``` | output | 1 | 17,579 | 23 | 35,159 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,580 | 23 | 35,160 |
Yes | output | 1 | 17,580 | 23 | 35,161 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,581 | 23 | 35,162 |
Yes | output | 1 | 17,581 | 23 | 35,163 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,582 | 23 | 35,164 |
Yes | output | 1 | 17,582 | 23 | 35,165 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,583 | 23 | 35,166 |
Yes | output | 1 | 17,583 | 23 | 35,167 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,584 | 23 | 35,168 |
No | output | 1 | 17,584 | 23 | 35,169 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,585 | 23 | 35,170 |
No | output | 1 | 17,585 | 23 | 35,171 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,586 | 23 | 35,172 |
No | output | 1 | 17,586 | 23 | 35,173 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and... | instruction | 0 | 17,587 | 23 | 35,174 |
No | output | 1 | 17,587 | 23 | 35,175 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,723 | 23 | 35,446 |
Tags: implementation, math
Correct Solution:
```
import sys
from io import StringIO
from atexit import register
## Modified from https://github.com/Cheran-Senthil/PyRival. Cheran Senthilkumar
BUFFER = StringIO(sys.stdin.read())
def input(): return BUFFER.readline().rstrip()
sys.stdout = StringIO()
register (lambda: sys... | output | 1 | 17,723 | 23 | 35,447 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,724 | 23 | 35,448 |
Tags: implementation, math
Correct Solution:
```
ax, ay = map(int, input().split())
bx, by = map(int, input().split())
cx, cy = map(int, input().split())
def f(cx, ax, bx, cy, ay, by):
mxy = max(ay, by, cy)
mny = min(ay, by, cy)
print(abs(cx - bx) + mxy - mny + 1)
for i in range(mny, mxy + 1):
... | output | 1 | 17,724 | 23 | 35,449 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,725 | 23 | 35,450 |
Tags: implementation, math
Correct Solution:
```
xx=[]
yy=[]
for _ in range(3):
a,b=map(int,input().split())
xx.append(a)
yy.append(b)
print(max(xx)-min(xx)+max(yy)-min(yy)+1)
w=sorted(zip(xx,yy))
for x in range(w[0][0],w[1][0]):
print(x,w[0][1])
for x in range(w[1][0]+1,w[2][0]+1):
print(x,w[2][1])... | output | 1 | 17,725 | 23 | 35,451 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,726 | 23 | 35,452 |
Tags: implementation, math
Correct Solution:
```
xx = []
yy = []
for _ in range(3):
x, y = map(int, input().split())
xx.append(x)
yy.append(y)
print(max(xx)-min(xx)+max(yy)-min(yy)+1)
w = sorted(zip(xx, yy))
for x in range(w[0][0], w[1][0]):
print(x, w[0][1])
for x in range(w[2][0], w[1][0], -1):
pr... | output | 1 | 17,726 | 23 | 35,453 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,727 | 23 | 35,454 |
Tags: implementation, math
Correct Solution:
```
from collections import defaultdict
import math
def ncr(n,m):
return math.factorial(n)//((math.factorial(m)*math.factorial(n-m)))
def gcd(n,m):
return math.gcd(n,m)
t=1
for t1 in range(0,t):
order=[]
for i in range(0,3):
x,y=map(int,input().split())
or... | output | 1 | 17,727 | 23 | 35,455 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,728 | 23 | 35,456 |
Tags: implementation, math
Correct Solution:
```
def func1(a,b,c,d,e):
j = max(c, d, e)
k = min(c, d, e)
print(j-k+1+abs(b-a))
for i in range(k,j+1):
print(str(a)+" "+str(i))
if a<b:
for i in range(a+1,b+1):
print(str(i)+" "+str(e))
else:
for i in range(b,a):
... | output | 1 | 17,728 | 23 | 35,457 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,729 | 23 | 35,458 |
Tags: implementation, math
Correct Solution:
```
def connect(x1, y1, x2, y2):
a = set()
if x2 > x1:
for i in range(x1, x2+1): a.add((i, y1))
if y2 > y1:
for j in range(y1, y2+1): a.add((x2, j))
else:
for j in range(y2, y1+1): a.add((x2, j))
else:
for i... | output | 1 | 17,729 | 23 | 35,459 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.
Three friends, ... | instruction | 0 | 17,730 | 23 | 35,460 |
Tags: implementation, math
Correct Solution:
```
points = []
mx = 0
for i in range(3):
points.append(list(map(int, input().split())))
points = sorted(points, key=lambda x: x[0])
k = 1
x, y = points[0][0], points[0][1]
x2, y2 = points[1][0], points[1][1]
coor = [[points[0][0], points[0][1]]]
mx = y
mn = y
while Tru... | output | 1 | 17,730 | 23 | 35,461 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,731 | 23 | 35,462 |
Yes | output | 1 | 17,731 | 23 | 35,463 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,732 | 23 | 35,464 |
Yes | output | 1 | 17,732 | 23 | 35,465 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,733 | 23 | 35,466 |
Yes | output | 1 | 17,733 | 23 | 35,467 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,734 | 23 | 35,468 |
Yes | output | 1 | 17,734 | 23 | 35,469 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,735 | 23 | 35,470 |
No | output | 1 | 17,735 | 23 | 35,471 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,736 | 23 | 35,472 |
No | output | 1 | 17,736 | 23 | 35,473 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,737 | 23 | 35,474 |
No | output | 1 | 17,737 | 23 | 35,475 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x... | instruction | 0 | 17,738 | 23 | 35,476 |
No | output | 1 | 17,738 | 23 | 35,477 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,107 | 23 | 36,214 |
Tags: geometry, sortings
Correct Solution:
```
from math import sqrt
class vector:
x, y, index = 0, 0, -1
def __init__(self, x, y, index):
self.x = x
self.y = y
self.index = index
def __lt__(self, other):
if self.x * other.x < 0:
return self.x > 0
if self.x == 0 and other.x == 0:
return self... | output | 1 | 18,107 | 23 | 36,215 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,108 | 23 | 36,216 |
Tags: geometry, sortings
Correct Solution:
```
from collections import namedtuple
from math import sqrt
from functools import cmp_to_key
Vec = namedtuple("Vec", "x y index")
Fraction = namedtuple("Fraction", "num denom")
def fraction_comp(a, b):
return a.num*b.denom > b.num*a.denom
def angle_comp(v):
result =... | output | 1 | 18,108 | 23 | 36,217 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,109 | 23 | 36,218 |
Tags: geometry, sortings
Correct Solution:
```
# FSX sb
def work():
def dot(x, y):
return x[0]*y[0]+x[1]*y[1]
n = int(input())
p = []
for i in range(n):
x, y = map(int, input().split(' '))
k = (20000 if y > 0 else -20000) if x == 0 else y / x
l2 = x * x + y * y
... | output | 1 | 18,109 | 23 | 36,219 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,110 | 23 | 36,220 |
Tags: geometry, sortings
Correct Solution:
```
import math
def dot(a, b):
return a[0] * b[0] + a[1] * b[1]
def cross(a, b):
return abs(a[0] * b[1] - a[1] * b[0])
n = int(input())
vectors = []
for i in range(n):
x, y = [int(x) for x in input().strip().split()]
vectors.append((i + 1, math.atan2(y, x... | output | 1 | 18,110 | 23 | 36,221 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,111 | 23 | 36,222 |
Tags: geometry, sortings
Correct Solution:
```
from functools import cmp_to_key
n = int(input())
def dot(p1,p2):
x1,y1 = p1
x2,y2 = p2
return x1 * x2 + y1 * y2
def cross(p1,p2):
x1,y1 = p1
x2,y2 = p2
return x1 * y2 - x2 * y1
def top(p):
x,y = p
return y > 0 or (y == 0 and x > 0)
... | output | 1 | 18,111 | 23 | 36,223 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,112 | 23 | 36,224 |
Tags: geometry, sortings
Correct Solution:
```
from math import atan2
inner = lambda a, b: a[0] * b[0] + a[1] * b[1]
outer = lambda a, b: a[0] * b[1] - a[1] * b[0]
N = int(input())
vectors = []
for i in range(N):
x, y = map(int, input().split())
vectors.append((atan2(y, x), (x, y), i + 1))
vectors.sort()
dif... | output | 1 | 18,112 | 23 | 36,225 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,113 | 23 | 36,226 |
Tags: geometry, sortings
Correct Solution:
```
from math import atan2
def dot(a, b):
return a[0]*b[0] + a[1]*b[1]
def cross(a, b):
return a[0]*b[1] - a[1]*b[0]
n = int(input())
a = []
for i in range(0, n):
[x, y] = map(int, input().split())
a.append([i + 1, [x, y]])
a.sort(key=lambda x... | output | 1 | 18,113 | 23 | 36,227 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise... | instruction | 0 | 18,114 | 23 | 36,228 |
Tags: geometry, sortings
Correct Solution:
```
from math import atan2
inner = lambda a, b: a[0] * b[0] + a[1] * b[1]
outer = lambda a, b: a[0] * b[1] - a[1] * b[0]
vectors = []
for i in range(int(input())):
x, y = map(int, input().split())
vectors.append((atan2(y, x), (x, y), i + 1))
vectors.sort()
diff = [... | output | 1 | 18,114 | 23 | 36,229 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,115 | 23 | 36,230 |
Yes | output | 1 | 18,115 | 23 | 36,231 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,116 | 23 | 36,232 |
Yes | output | 1 | 18,116 | 23 | 36,233 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,117 | 23 | 36,234 |
Yes | output | 1 | 18,117 | 23 | 36,235 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,118 | 23 | 36,236 |
Yes | output | 1 | 18,118 | 23 | 36,237 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,119 | 23 | 36,238 |
No | output | 1 | 18,119 | 23 | 36,239 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,120 | 23 | 36,240 |
No | output | 1 | 18,120 | 23 | 36,241 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,121 | 23 | 36,242 |
No | output | 1 | 18,121 | 23 | 36,243 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle i... | instruction | 0 | 18,122 | 23 | 36,244 |
No | output | 1 | 18,122 | 23 | 36,245 |
Provide a correct Python 3 solution for this coding contest problem.
Seiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in education, Katanobu Matsudaira, the lord of the domain of Aizu, had de... | instruction | 0 | 18,490 | 23 | 36,980 |
"Correct Solution:
```
# AOJ 1125: Get Many Persimmon Trees
# Python3 2018.7.14 bal4u
s = [[0 for x in range(105)] for y in range(105)]
while True:
N = int(input())
if N == 0: break
a = [[0 for x in range(105)] for y in range(105)]
W, H = map(int, input().split())
for i in range(N):
x, y = map(int, input().spli... | output | 1 | 18,490 | 23 | 36,981 |
Provide a correct Python 3 solution for this coding contest problem.
Seiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in education, Katanobu Matsudaira, the lord of the domain of Aizu, had de... | instruction | 0 | 18,491 | 23 | 36,982 |
"Correct Solution:
```
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
sys.setrecursionlimit(10**7)
inf = 10**3
eps = 1.0 / 10**10
mod = 10**9+7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readli... | output | 1 | 18,491 | 23 | 36,983 |
Provide a correct Python 3 solution for this coding contest problem.
Seiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in education, Katanobu Matsudaira, the lord of the domain of Aizu, had de... | instruction | 0 | 18,492 | 23 | 36,984 |
"Correct Solution:
```
def main(n):
w, h = map(int, input().split())
xy = [list(map(lambda x:int(x)-1, input().split())) for i in range(n)]
s, t = map(int, input().split())
field = [[0] * w for i in range(h)]
for x, y in xy:
field[y][x] = 1
ans = 0
for y in range(h - t + 1):
... | output | 1 | 18,492 | 23 | 36,985 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.