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 tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,958
23
109,916
Tags: data structures, dp, graphs, sortings Correct Solution: ``` # θ§£θͺ¬AC mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.buffer.readline for _ in range(int(input())): M = int(input()) LR_raw = [] val = set() for _ in range(M): l, r = map(...
output
1
54,958
23
109,917
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,959
23
109,918
Tags: data structures, dp, graphs, sortings Correct Solution: ``` from operator import itemgetter import bisect import sys input = sys.stdin.buffer.readline def topological_sort(graph: list) -> list: n = len(graph) degree = [0] * n for g in graph: for next_pos in g: degree[next_pos] +=...
output
1
54,959
23
109,919
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,960
23
109,920
Tags: data structures, dp, graphs, sortings Correct Solution: ``` from collections import deque t=1 for _ in range(int(input())): n=int(input()) val=set([0,2*10**5+1]) seg=[(0,2*10**5+1)] for i in range(n): l,r=map(int,input().split()) val.add(l) val.add(r) seg.append((l...
output
1
54,960
23
109,921
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,961
23
109,922
Tags: data structures, dp, graphs, sortings Correct Solution: ``` import sys def rs(): return sys.stdin.readline().rstrip() def ri(): return int(sys.stdin.readline()) def ria(): return list(map(int, sys.stdin.readline().split())) def ws(s): sys.stdout.write(s); sys.stdout.write('\n') def wi(n): sys.stdout.write(str(n))...
output
1
54,961
23
109,923
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,962
23
109,924
Tags: data structures, dp, graphs, sortings Correct Solution: ``` # Fast IO (only use in integer input) # import os,io # input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline t = int(input()) for _ in range(t): n = int(input()) pointList = [] pointOrderDict = {} interval = [] # (l,r) tuple int...
output
1
54,962
23
109,925
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,963
23
109,926
Tags: data structures, dp, graphs, sortings Correct Solution: ``` from collections import deque for _ in range(int(input())): n=int(input());val=set([0,2*10**5+1]);seg=[(0,2*10**5+1)] for i in range(n):l,r=map(int,input().split());val.add(l);val.add(r);seg.append((l,r)) val=sorted(list(val));comp={i:e+1 for...
output
1
54,963
23
109,927
Provide tags and a correct Python 3 solution for this coding contest problem. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the maximum by size (the number of segments) subset o...
instruction
0
54,964
23
109,928
Tags: data structures, dp, graphs, sortings Correct Solution: ``` import sys from collections import deque t=1 for _ in range(int(input())): n=int(input()) val=set([0,2*10**5+1]) seg=[(0,2*10**5+1)] for i in range(n): l,r=map(int,input().split()) val.add(l) val.add(r) se...
output
1
54,964
23
109,929
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,965
23
109,930
Yes
output
1
54,965
23
109,931
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,966
23
109,932
Yes
output
1
54,966
23
109,933
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,967
23
109,934
Yes
output
1
54,967
23
109,935
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,968
23
109,936
Yes
output
1
54,968
23
109,937
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,969
23
109,938
No
output
1
54,969
23
109,939
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,970
23
109,940
No
output
1
54,970
23
109,941
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,971
23
109,942
No
output
1
54,971
23
109,943
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given n segments on a coordinate axis OX. The i-th segment has borders [l_i; r_i]. All points x, for which l_i ≀ x ≀ r_i holds, belong to the i-th segment. Your task is to choose the ma...
instruction
0
54,972
23
109,944
No
output
1
54,972
23
109,945
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,981
23
109,962
Tags: greedy Correct Solution: ``` for _ in range(int(input())): l=list(map(int,input().split())) l1=[] for i in range(4): l1=l1+[max(l)] l.remove(l1[i]) print(l1[1]*l1[3]) ```
output
1
54,981
23
109,963
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,982
23
109,964
Tags: greedy Correct Solution: ``` for _ in range(int(input())): x=list(map(int,input().split())) y1=min(x) y2=max(x) x.remove(y1) x.remove(y2) y3=max(x) y4=min(x) print(abs(min(y1,y4)*min(y2,y3))) ```
output
1
54,982
23
109,965
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,983
23
109,966
Tags: greedy Correct Solution: ``` t = int(input()) for _ in range(t): a, b, c, d = map(int, input().split()) print(max(min(a, b) * min(c, d), min(a, c) * min(b, d), min(a, d) * min(b, c))) ```
output
1
54,983
23
109,967
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,984
23
109,968
Tags: greedy Correct Solution: ``` for _ in range(int(input())): a1,a2,a3,a4=map(int,input().split()) c=[[a1,a2],[a1,a3],[a1,a4]] maxi=-1 maxi=max(maxi,min(a1,a2)*min(a3,a4)) maxi=max(maxi,min(a1,a3)*min(a2,a4)) maxi=max(maxi,min(a1,a4)*min(a2,a3)) print(maxi) ```
output
1
54,984
23
109,969
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,985
23
109,970
Tags: greedy Correct Solution: ``` import sys zz=1 sys.setrecursionlimit(10**5) if zz: input=sys.stdin.readline else: sys.stdin=open('input.txt', 'r') sys.stdout=open('all.txt','w') di=[[-1,0],[1,0],[0,1],[0,-1]] def fori(n): return [fi() for i in range(n)] def inc(d,c,x=1): d[c]=d[c]+x if c in d else x def ...
output
1
54,985
23
109,971
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,986
23
109,972
Tags: greedy Correct Solution: ``` for _ in range(int(input())): li = list(map(int, input().split())) li.sort() print(li[0]*li[-2]) ```
output
1
54,986
23
109,973
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,987
23
109,974
Tags: greedy Correct Solution: ``` n = int(input()) for i in range(n): lista= [int(x) for x in input().split() ] lista.sort() print(min(lista[0],lista[1])*min(lista[2],lista[3])) ```
output
1
54,987
23
109,975
Provide tags and a correct Python 3 solution for this coding contest problem. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segment should be either horizontal or vertical. Mo...
instruction
0
54,988
23
109,976
Tags: greedy Correct Solution: ``` try: for i in range(int(input())): a = [int(i) for i in input().split()] a.sort() print(a[0]*a[2]) except: pass ```
output
1
54,988
23
109,977
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,989
23
109,978
Yes
output
1
54,989
23
109,979
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,990
23
109,980
Yes
output
1
54,990
23
109,981
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,991
23
109,982
Yes
output
1
54,991
23
109,983
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,992
23
109,984
Yes
output
1
54,992
23
109,985
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,993
23
109,986
No
output
1
54,993
23
109,987
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,994
23
109,988
No
output
1
54,994
23
109,989
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,995
23
109,990
No
output
1
54,995
23
109,991
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Monocarp wants to draw four line segments on a sheet of paper. He wants the i-th segment to have its length equal to a_i (1 ≀ i ≀ 4). These segments can intersect with each other, and each segme...
instruction
0
54,996
23
109,992
No
output
1
54,996
23
109,993
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,206
23
110,412
Tags: geometry, implementation Correct Solution: ``` n = int(input()) a = {} b = {} for i in range(n): t1, t2 = map(int, input().split()) a[t1] = t1 b[t2] = t2 if (len(a) < 2 or len(b) < 2): print(-1) else: r1 = 0 flag = 0 for i in a: if (flag == 1): r1 -= i else:...
output
1
55,206
23
110,413
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,207
23
110,414
Tags: geometry, implementation Correct Solution: ``` n = int(input()) points = [[int(x) for x in input().split()] for _ in range(n)] if n <= 1: print(-1) exit() dx = [1e9, -1e9] dy = [1e9, -1e9] for x, y in points: dx[0] = min(dx[0], x) dx[1] = max(dx[1], x) dy[0] = min(dy[0], y) dy[1] = max(dy[1], y) area = (dx[...
output
1
55,207
23
110,415
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,208
23
110,416
Tags: geometry, implementation Correct Solution: ``` n=int(input()) if n==1: x1,y1 = map(int, input().strip().split(' ')) print(-1) elif n==2: x1,y1 = map(int, input().strip().split(' ')) x2,y2 = map(int, input().strip().split(' ')) if x1==x2 or y1==y2: print(-1) else: print(abs(...
output
1
55,208
23
110,417
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,209
23
110,418
Tags: geometry, implementation Correct Solution: ``` n = int(input()) if n>2: a = [] for i in range(n): x, y = map(int, input().split()) a.append([x,y]) for j in range(n-1): for k in range(j+1,n): if a[j][0]!=a[k][0] and a[j][1]!=a[k][1]: print(abs(a[j][0]...
output
1
55,209
23
110,419
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,210
23
110,420
Tags: geometry, implementation Correct Solution: ``` v = int(input()) def pl3(v): point = [] for i in range(v): point.append(input().split()) for k in point: for j in point: if k[0] != j[0] and k[1] != j[1]: return abs((int(k[0])-int(j[0]))*(int(k[1])-int(j[1])))...
output
1
55,210
23
110,421
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,211
23
110,422
Tags: geometry, implementation Correct Solution: ``` n=int(input()) a=[] for i in range(n): b= list(map(int, input().split())) a.append(b) if n==1:print(-1) elif n==2: if a[0][0]!=a[1][0] and a[0][1]!=a[1][1]: print(abs(a[0][0]-a[1][0])*abs(a[0][1]-a[1][1])) else:print(-1) elif n==3: x1,x2,x...
output
1
55,211
23
110,423
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,212
23
110,424
Tags: geometry, implementation Correct Solution: ``` n = int(input()) p = [0] * n for i in range(n): p[i] = tuple(map(int, input().split())) if n == 4: for i in range(1, 4): if p[0][0] != p[i][0] and p[0][1] != p[i][1]: res = abs(p[0][0] - p[i][0]) * abs(p[0][1] - p[i][1]) elif n == 3: ...
output
1
55,212
23
110,425
Provide tags and a correct Python 3 solution for this coding contest problem. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area...
instruction
0
55,213
23
110,426
Tags: geometry, implementation Correct Solution: ``` # print("Input n") n = int(input()) a = [[0 for i in range(2)] for j in range(n)] for i in range(n): # print("Input the next pair of vertices") x,y = [int(t) for t in input().split()] a[i][0] = x a[i][1] = y if n == 1: print(-1) elif n == 2: ...
output
1
55,213
23
110,427
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,214
23
110,428
Yes
output
1
55,214
23
110,429
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,215
23
110,430
Yes
output
1
55,215
23
110,431
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,216
23
110,432
Yes
output
1
55,216
23
110,433
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,217
23
110,434
Yes
output
1
55,217
23
110,435
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,218
23
110,436
No
output
1
55,218
23
110,437
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,219
23
110,438
No
output
1
55,219
23
110,439
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,220
23
110,440
No
output
1
55,220
23
110,441
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectan...
instruction
0
55,221
23
110,442
No
output
1
55,221
23
110,443
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya likes to draw. He drew N red and M blue points on the plane in such a way that no three points lie on the same line. Now he wonders what is the number of distinct triangles with ver...
instruction
0
55,778
23
111,556
No
output
1
55,778
23
111,557
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya likes to draw. He drew N red and M blue points on the plane in such a way that no three points lie on the same line. Now he wonders what is the number of distinct triangles with ver...
instruction
0
55,779
23
111,558
No
output
1
55,779
23
111,559
Provide tags and a correct Python 3 solution for this coding contest problem. Vasily the bear has a favorite rectangle, it has one vertex at point (0, 0), and the opposite vertex at point (x, y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes. Vasya also loves triangles, if th...
instruction
0
55,916
23
111,832
Tags: implementation, math Correct Solution: ``` x,y=map(int,input().split()) sum1=abs(x)+abs(y) if(y>0): if(x<0): print(-1*(sum1),0,0,sum1) else: print(0,sum1,sum1,0) else: if(x<0): print(-1*(sum1),0,0,-1*(sum1)) else: print(0,-1*(sum1),sum1,0) ```
output
1
55,916
23
111,833