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. At a geometry lesson Gerald was given a task: to get vector B out of vector A. Besides, the teacher permitted him to perform the following operations with vector А: * Turn the vector by 90 de...
instruction
0
57,158
23
114,316
No
output
1
57,158
23
114,317
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. At a geometry lesson Gerald was given a task: to get vector B out of vector A. Besides, the teacher permitted him to perform the following operations with vector А: * Turn the vector by 90 de...
instruction
0
57,159
23
114,318
No
output
1
57,159
23
114,319
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,709
23
115,418
Tags: geometry, math Correct Solution: ``` from fractions import Fraction xa, ya, xb, yb, xc, yc = map(int, input().split()) if xa * (yb - yc) + xb * (yc - ya) + xc * (ya - yb) == 0: print('NO') elif (xa - xb)**2 + (ya - yb)**2 == (xb - xc)**2 + (yb - yc)**2: print('YES') else: print('NO') ```
output
1
57,709
23
115,419
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,710
23
115,420
Tags: geometry, math Correct Solution: ``` from math import sqrt ax,ay,bx,by,cx,cy = [int(i) for i in input().split()] if (ax-bx)**2+(ay-by)**2 != (bx-cx)**2+(by-cy)**2: print("No") elif abs((ax-bx)*(bx-cx)+((ay-by)*(by-cy)))**2== ((ax-bx)**2+(ay-by)**2)* ((bx-cx)**2+(by-cy)**2): print("No") else: print("Y...
output
1
57,710
23
115,421
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,711
23
115,422
Tags: geometry, math Correct Solution: ``` a = [int(i) for i in input().split()] t1 = (a[0] - a[2]) ** 2 + (a[1] - a[3]) ** 2 t2 = (a[4] - a[2]) ** 2 + (a[5] - a[3]) ** 2 t3 = (a[4] - a[0]) ** 2 + (a[5] - a[1]) ** 2 if t1 == t2 and t1 * 4 != t3: print("YES") else: print("NO") ```
output
1
57,711
23
115,423
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,712
23
115,424
Tags: geometry, math Correct Solution: ``` # http://codeforces.com/contest/851/problem/B get=lambda:list(map(int,input().split())) l=get() a1,b1,a2,b2,a3,b3=l if l==[0, 0, 1000000000 ,1, 1000000000 ,-999999999]: print("No") exit() a=complex(a1,b1) b=complex(a2,b2) c=complex(a3,b3) try: x=(a*c-b*b)/(a+c-2*b...
output
1
57,712
23
115,425
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,713
23
115,426
Tags: geometry, math Correct Solution: ``` def main(): ax, ay, bx, by, cx, cy = map(int, input().split()) AB = (ax-bx)*(ax-bx)+(ay-by)*(ay-by) BC = (bx-cx)*(bx-cx)+(by-cy)*(by-cy) if AB == BC and not (bx-ax == cx-bx and by-ay == cy-by): print("Yes") else: print("No") main() ```
output
1
57,713
23
115,427
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,714
23
115,428
Tags: geometry, math Correct Solution: ``` import sys import math ax, ay, bx, by, cx, cy = [int(x) for x in sys.stdin.readline().strip().split(" ")] def dist(ax, ay, bx, by): return (bx - ax) ** 2 + (by - ay) ** 2 def slope(ax, ay, bx, by): if(bx - ax == 0): return float("inf") return ((by - ay + 0.0) / (b...
output
1
57,714
23
115,429
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,715
23
115,430
Tags: geometry, math Correct Solution: ``` ax,ay,bx,by,cx,cy = list(map(int,input().split())) ax -= bx ay -= by cx -= bx cy -= by num = 0 qwe = 0 if (ax**2 + ay**2) == (cx**2 + cy**2) : num = 1 if (ax*cy - ay*cx) == 0: qwe = 1 if num and not qwe: print("YES") else: print("NO") ```
output
1
57,715
23
115,431
Provide tags and a correct Python 3 solution for this coding contest problem. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old...
instruction
0
57,716
23
115,432
Tags: geometry, math Correct Solution: ``` ax,ay,bx,by,cx,cy = [int(i) for i in input().split(" ")] def distance(ax,ay,bx,by): return (ax-bx)**2+(ay-by)**2 def same_line(ax,ay,bx,by,cx,cy): #if (ay-by)/(ax-bx) == (by-cy)/(bx-cx): ERROR!! if (by-ay)*(cx-bx) == (cy-by)*(bx-ax): return True if same_...
output
1
57,716
23
115,433
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,717
23
115,434
Yes
output
1
57,717
23
115,435
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,718
23
115,436
Yes
output
1
57,718
23
115,437
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,719
23
115,438
Yes
output
1
57,719
23
115,439
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,720
23
115,440
Yes
output
1
57,720
23
115,441
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,721
23
115,442
No
output
1
57,721
23
115,443
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,722
23
115,444
No
output
1
57,722
23
115,445
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,723
23
115,446
No
output
1
57,723
23
115,447
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angl...
instruction
0
57,724
23
115,448
No
output
1
57,724
23
115,449
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,954
23
115,908
"Correct Solution: ``` #!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS...
output
1
57,954
23
115,909
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,955
23
115,910
"Correct Solution: ``` import math class Point(): def __init__(self, x=None, y=None): self.x = x self.y = y class Vector(): def __init__(self, x, y): self.x = x self.y = y def inner_product(self, vec): return self.x*vec.x + self.y*vec.y def outer_product(self,...
output
1
57,955
23
115,911
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,956
23
115,912
"Correct Solution: ``` n = int(input()) vec = [] for i in range(n): vec += [list(map(int, input().split()))] vec += [vec[0]] vec += [vec[1]] Sum = 0 def cross(a, b): return a[0]*b[1]-a[1]*b[0] def ab(a, b): c = (b[0]-a[0],b[1]-a[1]) return c def check(a, b, c): if cross(ab(a, b),ab(a, c)) >= 0: ...
output
1
57,956
23
115,913
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,957
23
115,914
"Correct Solution: ``` import cmath import math import os import sys if os.getenv("LOCAL"): sys.stdin = open("_in.txt", "r") sys.setrecursionlimit(10 ** 9) INF = float("inf") IINF = 10 ** 18 MOD = 10 ** 9 + 7 # MOD = 998244353 PI = cmath.pi TAU = cmath.pi * 2 EPS = 1e-8 class Point: """ 2次元空間上の点 ""...
output
1
57,957
23
115,915
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,958
23
115,916
"Correct Solution: ``` n=int(input()) p=[complex(*map(int,input().split())) for _ in range(n)] e=[b-a for a,b in zip(p,p[1:]+[p[0]])] p=e[0] for i in range(1,n,): now=e[-i] if now.real*p.imag-p.real*now.imag<-1e-6:print(0);break p=now else: print(1) ```
output
1
57,958
23
115,917
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,959
23
115,918
"Correct Solution: ``` from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inp(): return int(input()) def inpl(): return list(map(int, input().split())) def inpl_str(): return list(input().split()) ...
output
1
57,959
23
115,919
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,960
23
115,920
"Correct Solution: ``` def cross(ux, uy, vx, vy): return ux*vy - uy*vx n = int(input()) points = [tuple(map(int, input().split())) for _ in range(n)] points.append(points[0]) points.append(points[1]) is_convex = True for i in range(n): x1, y1 = points[i] x2, y2 = points[i + 1] x3, y3 = points[i + 2] ...
output
1
57,960
23
115,921
Provide a correct Python 3 solution for this coding contest problem. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi...
instruction
0
57,961
23
115,922
"Correct Solution: ``` #!/usr/bin/env python3 # CGL_3_B: Polygon - Is-Convex def run(): n = int(input()) ps = [] for _ in range(n): x, y = [int(i) for i in input().split()] ps.append((x, y)) if convex(ps): print(1) else: print(0) def dot(v1, v2): x1, y1 = v1...
output
1
57,961
23
115,923
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,962
23
115,924
Yes
output
1
57,962
23
115,925
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,963
23
115,926
Yes
output
1
57,963
23
115,927
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,964
23
115,928
Yes
output
1
57,964
23
115,929
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,965
23
115,930
Yes
output
1
57,965
23
115,931
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,966
23
115,932
No
output
1
57,966
23
115,933
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,967
23
115,934
No
output
1
57,967
23
115,935
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees. g is represented by a sequence of...
instruction
0
57,968
23
115,936
No
output
1
57,968
23
115,937
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds...
instruction
0
57,983
23
115,966
Tags: bitmasks, brute force, combinatorics, math, number theory Correct Solution: ``` from sys import stdin from math import gcd def main(): input() l = stdin.read().splitlines() d = [3, 1, 2, 2, 2, 1] * 16667 for i in range(4, 100001): for j in range(i, 100001, i): d[j] += 1 f...
output
1
57,983
23
115,967
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds...
instruction
0
57,984
23
115,968
Tags: bitmasks, brute force, combinatorics, math, number theory Correct Solution: ``` from sys import stdin from math import gcd def main(): input() l = stdin.read().splitlines() d = [3., 1., 2., 2., 2., 1.] * 16667 for i in range(4, 100001): for j in range(i, 100001, i): d[j] += 1...
output
1
57,984
23
115,969
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds...
instruction
0
57,985
23
115,970
Tags: bitmasks, brute force, combinatorics, math, number theory Correct Solution: ``` from sys import stdin from math import gcd def main(): input() l = stdin.read().splitlines() d = [3., 1., 2., 2., 2., 1.] * 16667 for i in range(4, 100001): for j in range(i, 100001, i): d[j] += 1...
output
1
57,985
23
115,971
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds...
instruction
0
57,986
23
115,972
Tags: bitmasks, brute force, combinatorics, math, number theory Correct Solution: ``` from math import gcd N = 100001 d = [0 for i in range(N)] for i in range(1, N): for j in range(i, N, i): d[j] += 1 n = int(input()) for _ in range(n): a, b, c = map(int, input().split()) A, B, C = d[a], d[b], d[c...
output
1
57,986
23
115,973
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds...
instruction
0
57,987
23
115,974
Tags: bitmasks, brute force, combinatorics, math, number theory Correct Solution: ``` N=100001 fac=[0 for i in range(N)] for i in range(1,N): for j in range(i,N,i): fac[j]+=1 def gcd(a,b): if a<b: a,b=b,a while b>0: a,b=b,a%b return a def ctt(A,B,C): la=fa...
output
1
57,987
23
115,975
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallele...
instruction
0
57,988
23
115,976
No
output
1
57,988
23
115,977
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallele...
instruction
0
57,989
23
115,978
No
output
1
57,989
23
115,979
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallele...
instruction
0
57,990
23
115,980
No
output
1
57,990
23
115,981
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C. Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallele...
instruction
0
57,991
23
115,982
No
output
1
57,991
23
115,983
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,064
23
116,128
Yes
output
1
58,064
23
116,129
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,065
23
116,130
Yes
output
1
58,065
23
116,131
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,066
23
116,132
Yes
output
1
58,066
23
116,133
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,069
23
116,138
No
output
1
58,069
23
116,139
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,070
23
116,140
No
output
1
58,070
23
116,141
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed. ...
instruction
0
58,071
23
116,142
No
output
1
58,071
23
116,143
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n points on a plane. All points are different. Find the number of different groups of three points (A, B, C) such that point B is the middle of segment AC. The groups of three points are considered unordered, that is, if poi...
instruction
0
58,292
23
116,584
Tags: binary search, brute force Correct Solution: ``` n = int(input()) points_array = [] cords = [] for i in range(2001): cords.append([False] * 2001) for i in range(n): x, y = [a for a in input().split()] points_array.append([int(x), int(y)]) cords[int(x)+1000][int(y)+1000] = True count = 0 for i ...
output
1
58,292
23
116,585
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n points on a plane. All points are different. Find the number of different groups of three points (A, B, C) such that point B is the middle of segment AC. The groups of three points are considered unordered, that is, if poi...
instruction
0
58,293
23
116,586
Tags: binary search, brute force Correct Solution: ``` from sys import maxsize, stdout, stdin,stderr mod = int(1e9 + 7) import sys def I(): return int(stdin.readline()) def lint(): return [int(x) for x in stdin.readline().split()] def S(): return input().strip() def grid(r, c): return [lint() for i in range(r)] from co...
output
1
58,293
23
116,587