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.
There are n points on the plane, (x_1,y_1), (x_2,y_2), …, (x_n,y_n).
You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it ... | instruction | 0 | 43,826 | 23 | 87,652 |
No | output | 1 | 43,826 | 23 | 87,653 |
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 plane, (x_1,y_1), (x_2,y_2), …, (x_n,y_n).
You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it ... | instruction | 0 | 43,827 | 23 | 87,654 |
No | output | 1 | 43,827 | 23 | 87,655 |
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 plane, (x_1,y_1), (x_2,y_2), …, (x_n,y_n).
You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it ... | instruction | 0 | 43,828 | 23 | 87,656 |
No | output | 1 | 43,828 | 23 | 87,657 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,895 | 23 | 87,790 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
n,m=[int(k) for k in input().split(" ")]
s=[]
for k in range(n):
s+=[input()+1000*"."]
s+=[500*"."]*500
areok=set()
isdone=False
isok=True
for i in range(n):
for j in range(m):
#print(i,j,s[i][j])
if i>0 and s[i][j]=="*" and ... | output | 1 | 43,895 | 23 | 87,791 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,896 | 23 | 87,792 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
def dfn():
r,c=map(int,input().split())
ar=[]
# for _ in range(r):
# ar.append(input())
if r<3 or c<3:
return -1
ons=[]
mns=-1
ck=0
for i in range(r):
tp=input()
ar.append(tp)
k=tp.count("*")
if k==1:
if ons==[]:
oin=... | output | 1 | 43,896 | 23 | 87,793 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,897 | 23 | 87,794 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
n, m = map(int,input().split())
a = [[0] * m for i in range(n)]
for i in range(n):
a[i] = input()
x = -1
y = -1
for i in range(1, n-1):
for j in range(1, m-1):
if(a[i][j]=='*' and a[i-1][j]=='*' and a[i][j-1]=='*' and a[i... | output | 1 | 43,897 | 23 | 87,795 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,898 | 23 | 87,796 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
if __name__=="__main__":
[m,n]=list(map(int,input().split()))
# Accept the matrix
mat=[]
for i in range(m):
temp=list(input())
mat.append(temp)
visited={}
# Now detect the symbols
ans="NO"
# print(mat)
# for i in mat:
# for j in i:
# ... | output | 1 | 43,898 | 23 | 87,797 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,899 | 23 | 87,798 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
"""Template for Python Competitive Programmers prepared by pajengod and many others """
# ////////// SHUBHAM SHARMA \\\\\\\\\\\\\
# to use the print and division function of Python3
from __future__ import division, print_function
"""value of mod""... | output | 1 | 43,899 | 23 | 87,799 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,900 | 23 | 87,800 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
# n = int(input())
# if n & 1 == 1:
# print(0)
# else:
# print(2**(n//2))
h,w = map(int,input().split())
if h < 3 or w < 3:
print('NO')
exit(0)
mat = [[0] * w for _ in range(h)]
for i in range(h):
s = input()
for j in range(... | output | 1 | 43,900 | 23 | 87,801 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,901 | 23 | 87,802 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
a,b=input("").split()
h=int(a)
w=int(b)
dict={}
e=0
g=''
n=502
f=0
min=501
max=-1
z=0
y=True
for i in range(h):
k = input("")
if y:
dict[i]=0
c=0
for j in range(w):
if k[j]=='*':
f+=1
... | output | 1 | 43,901 | 23 | 87,803 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There should be some (at least one) consecutive non-e... | instruction | 0 | 43,902 | 23 | 87,804 |
Tags: dfs and similar, implementation, strings
Correct Solution:
```
#author: ankan2526
import math, bisect, heapq
n,m=map(int,input().split())
b=''
a=[]
for i in range(n):
x=input()
b+=x
a.append(list(x))
count=b.count('*')
if count>=n+m:
print('NO')
else:
z=0
for i in range(n):
for j... | output | 1 | 43,902 | 23 | 87,805 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,903 | 23 | 87,806 |
Yes | output | 1 | 43,903 | 23 | 87,807 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,904 | 23 | 87,808 |
Yes | output | 1 | 43,904 | 23 | 87,809 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,905 | 23 | 87,810 |
Yes | output | 1 | 43,905 | 23 | 87,811 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,906 | 23 | 87,812 |
Yes | output | 1 | 43,906 | 23 | 87,813 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,907 | 23 | 87,814 |
No | output | 1 | 43,907 | 23 | 87,815 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,908 | 23 | 87,816 |
No | output | 1 | 43,908 | 23 | 87,817 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,909 | 23 | 87,818 |
No | output | 1 | 43,909 | 23 | 87,819 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:
* A "+" shape has one center nonempty cell.
* There ... | instruction | 0 | 43,910 | 23 | 87,820 |
No | output | 1 | 43,910 | 23 | 87,821 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,084 | 23 | 88,168 |
Yes | output | 1 | 44,084 | 23 | 88,169 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,085 | 23 | 88,170 |
Yes | output | 1 | 44,085 | 23 | 88,171 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,086 | 23 | 88,172 |
Yes | output | 1 | 44,086 | 23 | 88,173 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,087 | 23 | 88,174 |
Yes | output | 1 | 44,087 | 23 | 88,175 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,089 | 23 | 88,178 |
No | output | 1 | 44,089 | 23 | 88,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,090 | 23 | 88,180 |
No | output | 1 | 44,090 | 23 | 88,181 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of t... | instruction | 0 | 44,091 | 23 | 88,182 |
No | output | 1 | 44,091 | 23 | 88,183 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A breakthrough among computer games, "Civilization XIII", is striking in its scale and elaborate details. Let's take a closer look at one of them.
The playing area in the game is split into con... | instruction | 0 | 44,329 | 23 | 88,658 |
No | output | 1 | 44,329 | 23 | 88,659 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,348 | 23 | 88,696 |
Tags: brute force, implementation
Correct Solution:
```
import sys
input=sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left,bisect
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
n,a,b=map(int... | output | 1 | 44,348 | 23 | 88,697 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,349 | 23 | 88,698 |
Tags: brute force, implementation
Correct Solution:
```
n, a, b = map(int, input().split())
A = []
for i in range(n):
A.append(list(map(int, input().split())))
def sqr(f, s):
for i in range(3):
if (a >= f[0] + s[0] and b >= max(f[1], s[1])) or (b >= f[0] + s[0] and a >= max(f[1], s[1])):
... | output | 1 | 44,349 | 23 | 88,699 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,350 | 23 | 88,700 |
Tags: brute force, implementation
Correct Solution:
```
n,a,b=map(int,input().split())
t=[]
for i in range(n):
t.append(list(map(int,input().split())))
m=0
for i in range(n-1):
for j in range(i+1,n):
x1,y1=t[i][0],t[i][1]
x2,y2=t[j][0],t[j][1]
c=x1+x2
d=max(y1,y2)
if c<=a... | output | 1 | 44,350 | 23 | 88,701 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,351 | 23 | 88,702 |
Tags: brute force, implementation
Correct Solution:
```
#RAVENS#TEAM_2#ESSI-DAYI_MOHSEN-LORENZO
import sys
input=sys.stdin.readline
def cal(r1,r2,a,b):
# 8 state
if r1[0]<=a and r1[1]<=b: #a,b
if (r2[0] <=a-r1[0] and r2[1]<=b) or (r2[1] <=a-r1[0] and r2[0]<=b):
return (r1[0]*r1[1]) + (r2[0]*r2[1])
if (r2[0] <=... | output | 1 | 44,351 | 23 | 88,703 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,352 | 23 | 88,704 |
Tags: brute force, implementation
Correct Solution:
```
def ldc( nt, mt, a, b ):
index = 0
if( nt >= a and mt >= b ):
index = 1
elif( nt >= b and mt >= a ):
index = 1
if( index == 1 ):
return 1
else:
return 0
t, n ,m = map(int,input().split())
list_a = []
list_b = [... | output | 1 | 44,352 | 23 | 88,705 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,353 | 23 | 88,706 |
Tags: brute force, implementation
Correct Solution:
```
k, n, m = map(int,input().split())
x, y = [],[]
for i in range(k):
q, p = map(int, input().split())
x.append(min(q, p))
y.append(max(q, p))
MAX = 0
for i in range(k):
for j in range(i+1,k):
ok = False
if x[i] + x[j] <= n and y[i] <=... | output | 1 | 44,353 | 23 | 88,707 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,354 | 23 | 88,708 |
Tags: brute force, implementation
Correct Solution:
```
from sys import stdin as fin
# fin = open("ecr26c.in", "r")
def check_place(x1, y1, x2, y2, x, y):
return (
# (x1 + x2 <= x and y1 + y2 >= y) or
(x1 + x2 <= x and max(y1, y2) <= y) or
(max(x1, x2) <= x and y1 + y2 <= y)
)
n, a... | output | 1 | 44,354 | 23 | 88,709 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides... | instruction | 0 | 44,355 | 23 | 88,710 |
Tags: brute force, implementation
Correct Solution:
```
import sys
def check(a, b, x, y, q, w):
if x + q <= a and max(y, w) <= b:
return True
if y + w <= b and max(x, q) <= a:
return True
return False
def main():
n, a, b = map(int, sys.stdin.readline().split())
t = []
for i i... | output | 1 | 44,355 | 23 | 88,711 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,356 | 23 | 88,712 |
Yes | output | 1 | 44,356 | 23 | 88,713 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,357 | 23 | 88,714 |
Yes | output | 1 | 44,357 | 23 | 88,715 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,358 | 23 | 88,716 |
Yes | output | 1 | 44,358 | 23 | 88,717 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,359 | 23 | 88,718 |
Yes | output | 1 | 44,359 | 23 | 88,719 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,360 | 23 | 88,720 |
No | output | 1 | 44,360 | 23 | 88,721 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,361 | 23 | 88,722 |
No | output | 1 | 44,361 | 23 | 88,723 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,362 | 23 | 88,724 |
No | output | 1 | 44,362 | 23 | 88,725 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One very important person has a piece of paper in the form of a rectangle a × b.
Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi... | instruction | 0 | 44,363 | 23 | 88,726 |
No | output | 1 | 44,363 | 23 | 88,727 |
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,405 | 23 | 88,810 |
"Correct Solution:
```
n = int(input())
p, q = [], []
for _ in range(n):
x, y = map(int, input().split())
p.append(x + y)
q.append(x - y)
p.sort()
q.sort()
print(max(max(p) - min(p), max(q) - min(q)))
``` | output | 1 | 44,405 | 23 | 88,811 |
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,406 | 23 | 88,812 |
"Correct Solution:
```
N = int(input())
xy = [list(map(int,input().split())) for _ in range(N)]
z = []
w = []
for i in range(N):
x,y = xy[i]
z.append(x+y)
w.append(x-y)
ans = max(max(z)-min(z),max(w)-min(w))
print(ans)
``` | output | 1 | 44,406 | 23 | 88,813 |
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,407 | 23 | 88,814 |
"Correct Solution:
```
n = int(input())
z,w = [],[]
for _ in range(n):
x,y = map(int,input().split())
z.append(x+y)
w.append(x-y)
print(max(max(z)-min(z),max(w)-min(w)))
``` | output | 1 | 44,407 | 23 | 88,815 |
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,408 | 23 | 88,816 |
"Correct Solution:
```
import sys
input=sys.stdin.readline
n=int(input())
ab=[]
A=-1e20
B=-1e20
C=1e20
D=1e20
for i in range(n):
x,y=map(int,input().split())
A=max(A,x+y)
B=max(B,x-y)
C=min(C,x+y)
D=min(D,x-y)
print(max(A-C,B-D))
``` | output | 1 | 44,408 | 23 | 88,817 |
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,409 | 23 | 88,818 |
"Correct Solution:
```
N = int(input())
x = [0]* N
y = [0] * N
for i in range(N):
a , b = map(int,input().split())
x[i] = a+b
y[i] = a-b
ans = max([max(x) - min(x),max(y) - min(y)])
print(ans)
``` | output | 1 | 44,409 | 23 | 88,819 |
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,410 | 23 | 88,820 |
"Correct Solution:
```
n=int(input())
z=[]
c=[]
for j in range(n):
x1,y1=[int(j) for j in input().split()]
z.append(x1+y1)
c.append(x1-y1)
za=max(z)
zi=min(z)
ca=max(c)
ci=min(c)
mx=max(za-zi,ca-ci)
print(mx)
``` | output | 1 | 44,410 | 23 | 88,821 |
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,411 | 23 | 88,822 |
"Correct Solution:
```
N = int(input())
a = []
b = []
for i in range(N):
x,y = (list(map(int,input().split())))
a.append(x+y)
b.append(x-y)
a.sort()
b.sort()
ans = max(a[-1]-a[0],b[-1]-b[0])
print(ans)
``` | output | 1 | 44,411 | 23 | 88,823 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.