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 |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an H × W grid.
The squares in the grid are described by H strings, S_1,...,S_H.
The j-th character in the string S_i corresponds to the square at the i-th row from the top and j-th... | instruction | 0 | 58,748 | 23 | 117,496 |
No | output | 1 | 58,748 | 23 | 117,497 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an H × W grid.
The squares in the grid are described by H strings, S_1,...,S_H.
The j-th character in the string S_i corresponds to the square at the i-th row from the top and j-th... | instruction | 0 | 58,749 | 23 | 117,498 |
No | output | 1 | 58,749 | 23 | 117,499 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an H × W grid.
The squares in the grid are described by H strings, S_1,...,S_H.
The j-th character in the string S_i corresponds to the square at the i-th row from the top and j-th... | instruction | 0 | 58,750 | 23 | 117,500 |
No | output | 1 | 58,750 | 23 | 117,501 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Denis holds a Geometers Anonymous Club meeting in SIS. He has prepared n convex polygons numbered from 1 to n for the club. He plans to offer members of the club to calculate Minkowski sums of t... | instruction | 0 | 58,912 | 23 | 117,824 |
No | output | 1 | 58,912 | 23 | 117,825 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Denis holds a Geometers Anonymous Club meeting in SIS. He has prepared n convex polygons numbered from 1 to n for the club. He plans to offer members of the club to calculate Minkowski sums of t... | instruction | 0 | 58,913 | 23 | 117,826 |
No | output | 1 | 58,913 | 23 | 117,827 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an integer k and n distinct points with integer coordinates on the Euclidean plane, the i-th point has coordinates (x_i, y_i).
Consider a list of all the (n(n - 1))/(2) pairs of p... | instruction | 0 | 59,045 | 23 | 118,090 |
No | output | 1 | 59,045 | 23 | 118,091 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an integer k and n distinct points with integer coordinates on the Euclidean plane, the i-th point has coordinates (x_i, y_i).
Consider a list of all the (n(n - 1))/(2) pairs of p... | instruction | 0 | 59,046 | 23 | 118,092 |
No | output | 1 | 59,046 | 23 | 118,093 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an integer k and n distinct points with integer coordinates on the Euclidean plane, the i-th point has coordinates (x_i, y_i).
Consider a list of all the (n(n - 1))/(2) pairs of p... | instruction | 0 | 59,047 | 23 | 118,094 |
No | output | 1 | 59,047 | 23 | 118,095 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an integer k and n distinct points with integer coordinates on the Euclidean plane, the i-th point has coordinates (x_i, y_i).
Consider a list of all the (n(n - 1))/(2) pairs of p... | instruction | 0 | 59,048 | 23 | 118,096 |
No | output | 1 | 59,048 | 23 | 118,097 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,147 | 23 | 118,294 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,m=map(int,input().split())
x=min(n,m)+1
print(x)
for i in range(x):
print(i,x-1-i)
``` | output | 1 | 59,147 | 23 | 118,295 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,148 | 23 | 118,296 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,m=map(int,input().split())
x=[]
y=[]
cnt=0
for i in range(0,min(n,m)+1):
cnt+=1
x.append(i)
y.append(min(n,m)-i)
print(cnt)
for i in range(cnt):
print(x[i],y[i])
``` | output | 1 | 59,148 | 23 | 118,297 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,149 | 23 | 118,298 |
Tags: constructive algorithms, implementation
Correct Solution:
```
import sys
inf = float("inf")
# sys.setrecursionlimit(10000000)
# abc='abcdefghijklmnopqrstuvwxyz'
# abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, '... | output | 1 | 59,149 | 23 | 118,299 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,150 | 23 | 118,300 |
Tags: constructive algorithms, implementation
Correct Solution:
```
a,b = list(map(int,input().split()))
k = min(a,b)
print(k+1)
for i in range(k+1):
print(i,k-i)
``` | output | 1 | 59,150 | 23 | 118,301 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,151 | 23 | 118,302 |
Tags: constructive algorithms, implementation
Correct Solution:
```
# import sys
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
n, m = map(int,input().split())
k = min(n, m) + 1
print(k)
for i in range(k):
print(i, min(n, m)-i)
``` | output | 1 | 59,151 | 23 | 118,303 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,152 | 23 | 118,304 |
Tags: constructive algorithms, implementation
Correct Solution:
```
l1 = list(map(int, input().split()))
m = l1[0]
n = l1[1]
ans = min(m,n) + 1
print(ans)
for i in range(ans):
print(f'{i} {ans-i-1}')
``` | output | 1 | 59,152 | 23 | 118,305 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,153 | 23 | 118,306 |
Tags: constructive algorithms, implementation
Correct Solution:
```
a,b=map(int,input().split())
m=min(a,b);
print(m+1);
for i in range(m+1):
print(i,m-i)
``` | output | 1 | 59,153 | 23 | 118,307 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in the set are integers.
2. For any two points... | instruction | 0 | 59,154 | 23 | 118,308 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,m=map(int,input().split())
print(min(n,m)+1)
x=min(n,m)
j=m
i=0
while j>=0 and i<=n:
print(i,j)
i+=1
j-=1
``` | output | 1 | 59,154 | 23 | 118,309 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,155 | 23 | 118,310 |
Yes | output | 1 | 59,155 | 23 | 118,311 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,156 | 23 | 118,312 |
Yes | output | 1 | 59,156 | 23 | 118,313 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,157 | 23 | 118,314 |
Yes | output | 1 | 59,157 | 23 | 118,315 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,158 | 23 | 118,316 |
Yes | output | 1 | 59,158 | 23 | 118,317 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,159 | 23 | 118,318 |
No | output | 1 | 59,159 | 23 | 118,319 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,160 | 23 | 118,320 |
No | output | 1 | 59,160 | 23 | 118,321 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,161 | 23 | 118,322 |
No | output | 1 | 59,161 | 23 | 118,323 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
1. The coordinates of each point in... | instruction | 0 | 59,162 | 23 | 118,324 |
No | output | 1 | 59,162 | 23 | 118,325 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,690 | 23 | 119,380 |
"Correct Solution:
```
def isCLKWISE(ph):
a = [-ph[-3][0]+ph[-1][0],ph[-1][1]-ph[-3][1]]
b = [-ph[-3][0]+ph[-2][0],ph[-2][1]-ph[-3][1]]
crs = b[1]*a[0] - a[1]*b[0]
if crs < 0 : return False
else : return True
def ConvexHullScan(P):
P = sorted(P)
phU = [P[0],P[1]]
for p in P[2:]:
... | output | 1 | 59,690 | 23 | 119,381 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,691 | 23 | 119,382 |
"Correct Solution:
```
from collections import deque
from functools import singledispatch
import math
EPS = 1e-10
COUNTER_CLOCKWISE = 1
CLOCKWISE = -1
ONLINE_BACK = 2
ONLINE_FRONT = -2
ON_SEGMENT = 0
class Segment():
def __init__(self, p1, p2):
self.p1 = p1
self.p2 = p2
class Circle():
def _... | output | 1 | 59,691 | 23 | 119,383 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,692 | 23 | 119,384 |
"Correct Solution:
```
def isCLKWISE(ph) : return not ((ph[-1][0] - ph[-3][0])*(- ph[-3][1] + ph[-2][1]) - (ph[-2][0] - ph[-3][0])*(- ph[-3][1] + ph[-1][1] ) < 0)
def ConvexHullScan(P):
P = sorted(P)
phU = [P[0],P[1]]
for p in P[2:]:
phU.append(p)
while(True):
try :
... | output | 1 | 59,692 | 23 | 119,385 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,693 | 23 | 119,386 |
"Correct Solution:
```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
input:
7
2 1
0 0
1 2
2 2
4 2
1 3
3 3
output:
5
0 0
2 1
4 2
3 3
1 3
"""
import sys
from operator import attrgetter
EPS = 1e-9
def cross(a, b):
return a.real * b.imag - a.imag * b.real
def dot(a, b):
return a.real * b.real + a.imag *... | output | 1 | 59,693 | 23 | 119,387 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,694 | 23 | 119,388 |
"Correct Solution:
```
import math
EPS = 1e-10
def equals(a, b):
return abs(a - b) < EPS
class Point:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
def __add__(self, p):
return Point(self.x + p.x, self.y + p.y)
def __sub__(self, p):
return Point(self.x - p.x, ... | output | 1 | 59,694 | 23 | 119,389 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,695 | 23 | 119,390 |
"Correct Solution:
```
# used in AOJ No.68, yukicoder No.199
# complexity: O(n^(1/2))
eps = 1e-10
def add(a, b):
return 0 if abs(a + b) < eps * (abs(a) + abs(b)) else a + b
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __add__(self, p):
return Point(add(self.x... | output | 1 | 59,695 | 23 | 119,391 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,696 | 23 | 119,392 |
"Correct Solution:
```
def cro(a,b):
return a.real * b.imag - a.imag * b.real
"""class Point:
def __init__(self,x,y):
self.x=x
self.y=y
def __repr__(self):
return repr((self.x, self.y))
"""
n = int(input())
p = []
po = []
for i in range(n):
x,y=list(int(x) for x in input().spli... | output | 1 | 59,696 | 23 | 119,393 |
Provide a correct Python 3 solution for this coding contest problem.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.
Please note that you should find ... | instruction | 0 | 59,697 | 23 | 119,394 |
"Correct Solution:
```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
input:
7
2 1
0 0
1 2
2 2
4 2
1 3
3 3
output:
5
0 0
2 1
4 2
3 3
1 3
"""
import sys
from operator import attrgetter
EPS = 1e-9
def cross(a, b):
return a.real * b.imag - a.imag * b.real
def dot(a, b):
return a.real * b.real + a.imag *... | output | 1 | 59,697 | 23 | 119,395 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,698 | 23 | 119,396 |
Yes | output | 1 | 59,698 | 23 | 119,397 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,699 | 23 | 119,398 |
Yes | output | 1 | 59,699 | 23 | 119,399 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,700 | 23 | 119,400 |
Yes | output | 1 | 59,700 | 23 | 119,401 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,701 | 23 | 119,402 |
Yes | output | 1 | 59,701 | 23 | 119,403 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,702 | 23 | 119,404 |
No | output | 1 | 59,702 | 23 | 119,405 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,703 | 23 | 119,406 |
No | output | 1 | 59,703 | 23 | 119,407 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,704 | 23 | 119,408 |
No | output | 1 | 59,704 | 23 | 119,409 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Find the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or ... | instruction | 0 | 59,705 | 23 | 119,410 |
No | output | 1 | 59,705 | 23 | 119,411 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,706 | 23 | 119,412 |
"Correct Solution:
```
import sys
if __name__ == '__main__':
n = int(input())
A = [sys.stdin.readline().split() for _ in range(n)]
B = sorted(A,key=lambda x:(int(x[0]),int(x[1])))
for i in range(n):
print(*B[i])
``` | output | 1 | 59,706 | 23 | 119,413 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,707 | 23 | 119,414 |
"Correct Solution:
```
class Pairs:
def __init__(self, x, y):
self.x = x
self.y = y
def __lt__(self, other):
if self.x < other.x:
return True
elif self.x == other.x:
return self.y < other.y
else:
return False
def __str__(self):
... | output | 1 | 59,707 | 23 | 119,415 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,708 | 23 | 119,416 |
"Correct Solution:
```
n = int(input())
xy = [list(map(int, input().split())) for i in range(n)]
xy.sort(key=lambda x:x[1])
xy.sort(key=lambda x:x[0])
for ele in xy:
print(ele[0], ele[1])
``` | output | 1 | 59,708 | 23 | 119,417 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,709 | 23 | 119,418 |
"Correct Solution:
```
b = int(input())
a = sorted([list(map(int,input().split())) for i in range(b)])
for c in a:
print(c[0],c[1])
``` | output | 1 | 59,709 | 23 | 119,419 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,710 | 23 | 119,420 |
"Correct Solution:
```
N = int(input())
P = [tuple(map(int,input().split())) for _ in range(N)]
P.sort()
for p in P:
print(*p)
``` | output | 1 | 59,710 | 23 | 119,421 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,711 | 23 | 119,422 |
"Correct Solution:
```
n = int(input())
li = []
for i in range(n):
l = list(map(int, input().split()))
li.append(l)
li = sorted(li)
for i in li:
print(" ".join(map(str, i)))
``` | output | 1 | 59,711 | 23 | 119,423 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,712 | 23 | 119,424 |
"Correct Solution:
```
from typing import List, Tuple
if __name__ == "__main__":
n = int(input())
coordinates: List[Tuple[int, int]] = []
for _ in range(n):
(x, y) = tuple(map(lambda x: int(x), input().split()))
coordinates.append((x, y))
coordinates = sorted(coordinates, key=lambda ... | output | 1 | 59,712 | 23 | 119,425 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
* $1 \leq n \leq 100,000$
* $-1,000,000,000 \leq x_i, y_... | instruction | 0 | 59,713 | 23 | 119,426 |
"Correct Solution:
```
# AOJ ITP2_5_A: Sorting Pairs
# Python3 2018.6.24 bal4u
ps = []
n = int(input())
for i in range(n):
x, y = map(int, input().split())
ps.append((x, y))
ps.sort()
for i in ps: print(*i)
``` | output | 1 | 59,713 | 23 | 119,427 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which print coordinates $(x_i, y_i)$ of given $n$ points on the plane by the following criteria.
1. first by $x$-coordinate
2. in case of a tie, by $y$-coordinate
Constraints
... | instruction | 0 | 59,714 | 23 | 119,428 |
Yes | output | 1 | 59,714 | 23 | 119,429 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.