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 are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?
Here, the Manhattan distance betwee... | instruction | 0 | 44,412 | 23 | 88,824 |
"Correct Solution:
```
n=int(input())
xy=[tuple(map(int, input().split())) for _ in range(n)]
fn=[lambda x:x[0]+x[1],lambda x:x[0]-x[1]]
ans=0
for f in fn:
xy.sort(key = f)
ans=max(ans,abs(f(xy[0])-f(xy[-1])))
print(ans)
``` | output | 1 | 44,412 | 23 | 88,825 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,413 | 23 | 88,826 |
Yes | output | 1 | 44,413 | 23 | 88,827 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,414 | 23 | 88,828 |
Yes | output | 1 | 44,414 | 23 | 88,829 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,415 | 23 | 88,830 |
Yes | output | 1 | 44,415 | 23 | 88,831 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,416 | 23 | 88,832 |
Yes | output | 1 | 44,416 | 23 | 88,833 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,417 | 23 | 88,834 |
No | output | 1 | 44,417 | 23 | 88,835 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,418 | 23 | 88,836 |
No | output | 1 | 44,418 | 23 | 88,837 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,419 | 23 | 88,838 |
No | output | 1 | 44,419 | 23 | 88,839 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between t... | instruction | 0 | 44,420 | 23 | 88,840 |
No | output | 1 | 44,420 | 23 | 88,841 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,511 | 23 | 89,022 |
"Correct Solution:
```
x,y,z=[int(i) for i in input().split()]
x-=z
print(x//(y+z))
``` | output | 1 | 44,511 | 23 | 89,023 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,512 | 23 | 89,024 |
"Correct Solution:
```
X, Y, Z = map(int, input().split())
print((X-Z)//(Z+Y))
``` | output | 1 | 44,512 | 23 | 89,025 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,513 | 23 | 89,026 |
"Correct Solution:
```
X, Y, Z = map(int, input().split())
r = (X-Z)//(Y+Z)
print(r)
``` | output | 1 | 44,513 | 23 | 89,027 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,514 | 23 | 89,028 |
"Correct Solution:
```
x, y, z = [int(x) for x in input().split()]
print((x - z) // (z + y))
``` | output | 1 | 44,514 | 23 | 89,029 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,515 | 23 | 89,030 |
"Correct Solution:
```
X,Y,Z=map(int,input().split())
a=X-Z
b=Y+Z
print(a//b)
``` | output | 1 | 44,515 | 23 | 89,031 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,516 | 23 | 89,032 |
"Correct Solution:
```
X,Y,Z = map(int, input().split())
answer = (X-Z) // (Y+Z)
print(answer)
``` | output | 1 | 44,516 | 23 | 89,033 |
Provide a correct Python 3 solution for this coding contest problem.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to seat as many people as possible, but they are all very shy... | instruction | 0 | 44,517 | 23 | 89,034 |
"Correct Solution:
```
x,y,z = map(int,input().split())
print(int((x-z)//(y+z)))
``` | output | 1 | 44,517 | 23 | 89,035 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,519 | 23 | 89,038 |
Yes | output | 1 | 44,519 | 23 | 89,039 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,521 | 23 | 89,042 |
Yes | output | 1 | 44,521 | 23 | 89,043 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,522 | 23 | 89,044 |
Yes | output | 1 | 44,522 | 23 | 89,045 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,523 | 23 | 89,046 |
No | output | 1 | 44,523 | 23 | 89,047 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,525 | 23 | 89,050 |
No | output | 1 | 44,525 | 23 | 89,051 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.
We would like to se... | instruction | 0 | 44,526 | 23 | 89,052 |
No | output | 1 | 44,526 | 23 | 89,053 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,610 | 23 | 89,220 |
"Correct Solution:
```
#!/usr/bin/python3
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline
def main():
n = int(readline())
xy = [tuple(map(int, readline().split())) + (i,) for i in range(n)]
# [..., (x_i, y_i, i), ...]
... | output | 1 | 44,610 | 23 | 89,221 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,611 | 23 | 89,222 |
"Correct Solution:
```
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
def main():
xy = [tuple(map(int, input().split()))+(i, ) for i in range(int(input()))]
xy.sort()
root = int(math.sqrt(len(xy)))
low = [x for x,y,i in xy[::root]]
hig... | output | 1 | 44,611 | 23 | 89,223 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,612 | 23 | 89,224 |
"Correct Solution:
```
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline
def main():
n = int(readline())
xy = [tuple(map(int, readline().split())) + (i,) for i in range(n)]
xy.sort()
root = int(math.sqrt(len(xy)))... | output | 1 | 44,612 | 23 | 89,225 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,613 | 23 | 89,226 |
"Correct Solution:
```
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline
def main():
xy = [tuple(map(int, readline().split())) + (i, ) for i in range(int(readline()))]
xy.sort()
root = int(math.sqrt(len(xy)))
low = [x for x... | output | 1 | 44,613 | 23 | 89,227 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,614 | 23 | 89,228 |
"Correct Solution:
```
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
def resolve():
N = int(input())
XY = [tuple(map(int, input().split())) + (i,) for i in range(N)]
XY.sort()
root = int(math.sqrt(N))
low = [x for x, y, id in XY[::root]]
high = [x f... | output | 1 | 44,614 | 23 | 89,229 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,615 | 23 | 89,230 |
"Correct Solution:
```
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline
def main():
xy = [tuple(map(int, readline().split())) + (i,) for i in range(int(readline()))]
xy.sort()
root = int(math.sqrt(len(xy)))
low = [... | output | 1 | 44,615 | 23 | 89,231 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,616 | 23 | 89,232 |
"Correct Solution:
```
from sys import stdin
import math
from operator import itemgetter, attrgetter
from bisect import bisect_left, bisect_right
n = int(stdin.readline())
lx = []
ly = []
li = []
for i in range(n):
x, y = map(int, stdin.readline().split())
lx.append(x)
ly.append(y)
li.append(i)
x_width ... | output | 1 | 44,616 | 23 | 89,233 |
Provide a correct Python 3 solution for this coding contest problem.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are within in a given range. Note that you do not need to consid... | instruction | 0 | 44,617 | 23 | 89,234 |
"Correct Solution:
```
#!/usr/bin/env pypy3
# DSL_2_C: Range Search(kD Tree)
from bisect import bisect_left, bisect_right
from collections import deque
from functools import lru_cache
from itertools import islice
from math import floor, log2, sqrt
from operator import itemgetter
from sys import stdin, stdout
def sor... | output | 1 | 44,617 | 23 | 89,235 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,618 | 23 | 89,236 |
Yes | output | 1 | 44,618 | 23 | 89,237 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,619 | 23 | 89,238 |
Yes | output | 1 | 44,619 | 23 | 89,239 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,620 | 23 | 89,240 |
Yes | output | 1 | 44,620 | 23 | 89,241 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,621 | 23 | 89,242 |
Yes | output | 1 | 44,621 | 23 | 89,243 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,622 | 23 | 89,244 |
No | output | 1 | 44,622 | 23 | 89,245 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,623 | 23 | 89,246 |
No | output | 1 | 44,623 | 23 | 89,247 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,624 | 23 | 89,248 |
No | output | 1 | 44,624 | 23 | 89,249 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The range search problem consists of a set of attributed records S to determine which records from S intersect with a given range.
For n points on a plane, report a set of points which are with... | instruction | 0 | 44,625 | 23 | 89,250 |
No | output | 1 | 44,625 | 23 | 89,251 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,812 | 23 | 89,624 |
Yes | output | 1 | 44,812 | 23 | 89,625 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,813 | 23 | 89,626 |
Yes | output | 1 | 44,813 | 23 | 89,627 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,814 | 23 | 89,628 |
Yes | output | 1 | 44,814 | 23 | 89,629 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,815 | 23 | 89,630 |
Yes | output | 1 | 44,815 | 23 | 89,631 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,816 | 23 | 89,632 |
No | output | 1 | 44,816 | 23 | 89,633 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,817 | 23 | 89,634 |
No | output | 1 | 44,817 | 23 | 89,635 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,818 | 23 | 89,636 |
No | output | 1 | 44,818 | 23 | 89,637 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sasha likes investigating different math objects, for example, magic squares. But Sasha understands that magic squares have already been studied by hundreds of people, so he sees no sense of stu... | instruction | 0 | 44,819 | 23 | 89,638 |
No | output | 1 | 44,819 | 23 | 89,639 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,977 | 23 | 89,954 |
Tags: geometry
Correct Solution:
```
import math
n, r = map(int, input().split())
X = 2 * r * math.sin(math.pi / n)
Y = X * math.sin(math.pi * (n - 3) / (2 * n)) / math.sin(3 * math.pi / n)
S1 = 1 / 2 * Y * Y * math.sin(3 * math.pi / n)
S2 = r * r * (math.pi / n - 1 / 2 * math.sin(2 * math.pi / n))
ans = math.pi * r ... | output | 1 | 44,977 | 23 | 89,955 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,978 | 23 | 89,956 |
Tags: geometry
Correct Solution:
```
import math
n, r = map(int, input().split(' '))
alpha = math.pi/n/2
beta = math.pi/n
gamma = math.pi-alpha-beta
print(r*r*math.sin(alpha)*math.sin(beta)/math.sin(gamma)*n)
``` | output | 1 | 44,978 | 23 | 89,957 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,979 | 23 | 89,958 |
Tags: geometry
Correct Solution:
```
import math
Pi = math.pi
n, r = map(float, input().split())
x = math.tan (Pi / n)
y = math.tan (Pi / n / 2)
base = r / (1 / x + 1 / y)
print (n * r * base)
``` | output | 1 | 44,979 | 23 | 89,959 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,980 | 23 | 89,960 |
Tags: geometry
Correct Solution:
```
import math as ma
a,b= [int(x) for x in input().split()]
x = ma.pi/a
print((a*(b**2)*(ma.tan(x))*ma.tan(x/2))/(ma.tan(x) + ma.tan(x/2)))
``` | output | 1 | 44,980 | 23 | 89,961 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.