message
stringlengths
2
20.2k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
757
108k
cluster
float64
4
4
__index_level_0__
int64
1.51k
217k
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,899
4
115,798
"Correct Solution: ``` def change(time): if time >= 10: return str(time) else: return "0" + str(time) def print_times(ans): sec = ans % 60 ans -= sec minu = ans % 3600 ans -= minu minu //= 60 hour = ans//3600 print(":".join(map(change,(hour,minu,sec)))) while True: t,h,s = map(int,input().s...
output
1
57,899
4
115,799
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,900
4
115,800
"Correct Solution: ``` while 1: try: h,m,s=map(int,input().split()) if h+m+s==-3:break last=7200-h*3600-m*60-s print(f'{last//3600:0>2}:{(last%3600)//60:0>2}:{last%60:0>2}') last*=3 print(f'{last//3600:0>2}:{(last%3600)//60:0>2}:{last%60:0>2}') except:break ...
output
1
57,900
4
115,801
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,901
4
115,802
"Correct Solution: ``` p=lambda x:print(f'{x//3600:02}:{x//60%60:02}:{x%60:02}') while 1: h,m,s=map(int,input().split()) if h<0:break d=7200-h*3600-m*60-s p(d);p(d*3) ```
output
1
57,901
4
115,803
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,902
4
115,804
"Correct Solution: ``` import sys f = sys.stdin from datetime import timedelta def formatHHMMSS(delta): return '{:02d}:{:02d}:{:02d}'.format(delta.seconds // 3600, delta.seconds % 3600 // 60, delta.seconds % 60) while True: leave_time = timedelta(hours=2) h, m, s = map(int, f.readline().split()) if h...
output
1
57,902
4
115,805
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,903
4
115,806
"Correct Solution: ``` def zan(total, flag): rest = 7200 - total if flag else (7200 - total) * 3 t, rest = divmod(rest, 3600) h, s = divmod(rest, 60) print("{0:02d}:{1:02d}:{2:02d}".format(t, h, s)) while True: T, H, S = map(int, input().split()) if T == -1: break total = T * 3600 +...
output
1
57,903
4
115,807
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,904
4
115,808
"Correct Solution: ``` def f(t): print("{:02d}:{:02d}:{:02d}".format(t//3600,(t%3600)//60,(t%3600)%60)) if __name__=="__main__": while 1: h,m,s=map(int,input().split()) if h<0:break t=7200-h*3600-m*60-s f(t) f(t*3) ```
output
1
57,904
4
115,809
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,905
4
115,810
"Correct Solution: ``` # Aizu Problem 0074: Videotape # import sys, math, os # read input: PYDEV = os.environ.get('PYDEV') if PYDEV=="True": sys.stdin = open("sample-input.txt", "rt") while True: t, m, s = [int(_) for _ in input().split()] if t == m == s == -1: break secs_left = 7200 - 3600 *...
output
1
57,905
4
115,811
Provide a correct Python 3 solution for this coding contest problem. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter value. Enter this counter value (hours, minutes, seconds...
instruction
0
57,906
4
115,812
"Correct Solution: ``` while True: h,m,s = [int(x) for x in input().split()] if h < 0 and m < 0 and s < 0: break r = 7200 - h * 3600 - m * 60 - s for m in [ 1, 3]: tmp = r * m dh = tmp // 3600 dm = (tmp % 3600) // 60 ds = tmp % 60 print("{:02d}:{:02d}...
output
1
57,906
4
115,813
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,907
4
115,814
Yes
output
1
57,907
4
115,815
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,908
4
115,816
Yes
output
1
57,908
4
115,817
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,909
4
115,818
Yes
output
1
57,909
4
115,819
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,910
4
115,820
Yes
output
1
57,910
4
115,821
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,911
4
115,822
No
output
1
57,911
4
115,823
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,912
4
115,824
No
output
1
57,912
4
115,825
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,913
4
115,826
No
output
1
57,913
4
115,827
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There is a 120 minute videotape with standard recording. When I set the VCR counter to 00:00:00 with the tape completely rewound and recorded in standard recording mode, I got a certain counter ...
instruction
0
57,914
4
115,828
No
output
1
57,914
4
115,829
Provide a correct Python 3 solution for this coding contest problem. A trick of fate caused Hatsumi and Taku to come to know each other. To keep the encounter in memory, they decided to calculate the difference between their ages. But the difference in ages varies depending on the day it is calculated. While trying ag...
instruction
0
57,929
4
115,858
"Correct Solution: ``` y1,m1,d1 = map(int, input().split()) y2,m2,d2 = map(int, input().split()) if y1 > y2 or (y1 == y2 and (m1 > m2 or ( m1 == m2 and d1 > d2 ))): y1, y2 = y2, y1 m1, m2 = m2, m1 d1, d2 = d2, d1 if m1 < m2 or (m1 == m2 and d1 < d2): print(y2 - y1 + 1) else: print(y2 - y1) ```
output
1
57,929
4
115,859
Provide a correct Python 3 solution for this coding contest problem. A trick of fate caused Hatsumi and Taku to come to know each other. To keep the encounter in memory, they decided to calculate the difference between their ages. But the difference in ages varies depending on the day it is calculated. While trying ag...
instruction
0
57,930
4
115,860
"Correct Solution: ``` a = sorted([tuple(map(int,input().split())) for _ in [0,0]]) print(a[1][0] - a[0][0] + (1 if a[1][1] > a[0][1] or (a[1][1] == a[0][1] and a[1][2] > a[0][2]) else 0)) ```
output
1
57,930
4
115,861
Provide a correct Python 3 solution for this coding contest problem. A trick of fate caused Hatsumi and Taku to come to know each other. To keep the encounter in memory, they decided to calculate the difference between their ages. But the difference in ages varies depending on the day it is calculated. While trying ag...
instruction
0
57,931
4
115,862
"Correct Solution: ``` a,b,c = map(int,input().split()) d,e,f = map(int,input().split()) if b == e and c == f: print(abs(a-d)) exit() if a > d: num = 100 * b + c nu = 100 * e + f elif a < d: num = 100 * e + f nu = 100 * b + c else: print(1) exit() if num > nu: print(abs(a-d)+1) else: print(abs(a-d))...
output
1
57,931
4
115,863
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,880
4
117,760
Tags: math, number theory Correct Solution: ``` from math import gcd n,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) G=A[1]-A[0] for i in range(1,n): G=gcd(G,A[i]-A[i-1]) for i in range(m): if(G%B[i]==0): print("YES") print(A[0],i+1) exit() ...
output
1
58,880
4
117,761
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,881
4
117,762
Tags: math, number theory Correct Solution: ``` from math import gcd def go(): n, m = map(int, input().split(' ')) x = [int(i) for i in input().split(' ')] p = [int(i) for i in input().split(' ')] diffs = set() start = x[0] for i in range(1, n): diffs.add(x[i] - x[i - 1]) d = list(s...
output
1
58,881
4
117,763
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,882
4
117,764
Tags: math, number theory Correct Solution: ``` import math n,m = map(int, input().split()) alarms = list(map(int, input().split())) diff = list(map(int, input().split())) prev = alarms[0] currGcd = alarms[1] - alarms[0] for i in alarms[1:]: currGcd = math.gcd(currGcd,i - prev) prev = i # print(currGcd) fl...
output
1
58,882
4
117,765
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,883
4
117,766
Tags: math, number theory Correct Solution: ``` from math import gcd (n, m), x, p = [int(i) for i in input().split()], [int(i) for i in input().split()], [int(i) for i in input().split()] gc = x[1] - x[0] for i in range(len(x) - 1): gc = gcd(gc, abs(x[i] - x[i + 1])) for i in range(len(p)): if gc % p[i] == 0: ...
output
1
58,883
4
117,767
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,884
4
117,768
Tags: math, number theory Correct Solution: ``` ll=lambda:map(int,input().split()) t=lambda:int(input()) ss=lambda:input() #from math import log10 ,log2,ceil,factorial as f,gcd #from itertools import combinations_with_replacement as cs #from functools import reduce from math import gcd ''' for _ in range(t()): n=t...
output
1
58,884
4
117,769
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,885
4
117,770
Tags: math, number theory Correct Solution: ``` def euclidesMCD(a, b): # Algortimo de euclides para obtener el mcd entre a y b, O(log n) while(b): # Mientras el segundo número o el resto no sea 0 a, b = b, a % b # Asigna b a a, y a b el resto de la división de a entre b return a # Retorna el máximo ...
output
1
58,885
4
117,771
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,886
4
117,772
Tags: math, number theory Correct Solution: ``` from math import gcd n,m = map(int,input().split()) x = list(map(int,input().split())) p = list(map(int,input().split())) g = x[1] - x[0] for i in range(2,n): g = gcd(g,x[i] - x[i-1]) if g == 1: break for j in range(m): if g%p[j] == 0: print("YES") print(x[...
output
1
58,886
4
117,773
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in...
instruction
0
58,887
4
117,774
Tags: math, number theory Correct Solution: ``` from sys import stdin,stdout from bisect import bisect_right as br from bisect import bisect_left as bl from bisect import insort_left as il from math import gcd yes=False n,m=map(int,stdin.readline().split()) t=[int(i) for i in stdin.readline().split()] diff=[] ch=[in...
output
1
58,887
4
117,775
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,888
4
117,776
Yes
output
1
58,888
4
117,777
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,889
4
117,778
Yes
output
1
58,889
4
117,779
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,890
4
117,780
Yes
output
1
58,890
4
117,781
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,891
4
117,782
Yes
output
1
58,891
4
117,783
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,892
4
117,784
No
output
1
58,892
4
117,785
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,893
4
117,786
No
output
1
58,893
4
117,787
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,894
4
117,788
No
output
1
58,894
4
117,789
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of ...
instruction
0
58,895
4
117,790
No
output
1
58,895
4
117,791
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,761
4
121,522
Yes
output
1
60,761
4
121,523
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,762
4
121,524
Yes
output
1
60,762
4
121,525
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,763
4
121,526
Yes
output
1
60,763
4
121,527
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,764
4
121,528
Yes
output
1
60,764
4
121,529
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,765
4
121,530
No
output
1
60,765
4
121,531
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,766
4
121,532
No
output
1
60,766
4
121,533
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,767
4
121,534
No
output
1
60,767
4
121,535
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Central Company has an office with a sophisticated security system. There are 10^6 employees, numbered from 1 to 10^6. The security system logs entrances and departures. The entrance of the...
instruction
0
60,768
4
121,536
No
output
1
60,768
4
121,537
Provide a correct Python 3 solution for this coding contest problem. Miki is a high school student. She has a part time job, so she cannot take enough sleep on weekdays. She wants to take good sleep on holidays, but she doesn't know the best length of sleeping time for her. She is now trying to figure that out with th...
instruction
0
61,436
4
122,872
"Correct Solution: ``` import sys sys.setrecursionlimit(10**9) def input(): return sys.stdin.readline()[:-1] EPS = 1e-10 k, L, R = map(int, input().split()) p = float(input()) e = float(input()) t = float(input()) def search(l, r, prob, depth): #print(l, r, prob, depth) if depth == k: h = (l+r)/2 if abs(h-t) ...
output
1
61,436
4
122,873
Provide a correct Python 3 solution for this coding contest problem. Miki is a high school student. She has a part time job, so she cannot take enough sleep on weekdays. She wants to take good sleep on holidays, but she doesn't know the best length of sleeping time for her. She is now trying to figure that out with th...
instruction
0
61,437
4
122,874
"Correct Solution: ``` import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int...
output
1
61,437
4
122,875
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Miki is a high school student. She has a part time job, so she cannot take enough sleep on weekdays. She wants to take good sleep on holidays, but she doesn't know the best length of sleeping ti...
instruction
0
61,438
4
122,876
No
output
1
61,438
4
122,877
Provide a correct Python 3 solution for this coding contest problem. B: Periodic Sequence- problem Dr. Period, a professor at H University, is studying a property called the cycle that is supposed to be hidden in all things. As a generally known basic cycle, a cycle hidden in a sequence may be considered. That is, i...
instruction
0
61,439
4
122,878
"Correct Solution: ``` n=int(input()) a=list(map(int,input().split())) for i in range(1,n+1): if n%i==0: for j in range(n): if j>=i and a[j]!=a[j-i]:break else:print(n//i);exit() print(1) ```
output
1
61,439
4
122,879
Provide a correct Python 3 solution for this coding contest problem. B: Periodic Sequence- problem Dr. Period, a professor at H University, is studying a property called the cycle that is supposed to be hidden in all things. As a generally known basic cycle, a cycle hidden in a sequence may be considered. That is, i...
instruction
0
61,440
4
122,880
"Correct Solution: ``` N = int(input()) Ss = input().split() res = 1 for t in range(1, N+1): if (N%t != 0): continue f = False for i in range(N-t): if (Ss[i] == Ss[i + t]): continue f = True break if (f): continue res = N // t break print(res) ```
output
1
61,440
4
122,881
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. B: Periodic Sequence- problem Dr. Period, a professor at H University, is studying a property called the cycle that is supposed to be hidden in all things. As a generally known basic cycle, a ...
instruction
0
61,441
4
122,882
No
output
1
61,441
4
122,883
Provide tags and a correct Python 3 solution for this coding contest problem. Luba needs your help again! Luba has n TV sets. She knows that i-th TV set will be working from moment of time li till moment ri, inclusive. Luba wants to switch off one of TV sets in order to free the socket. Let's call some TV set redunda...
instruction
0
61,974
4
123,948
Tags: data structures, sortings Correct Solution: ``` n=int(input()) a=[(-1,-1,0)] for i in range(n): x,y=map(int,input().split()) a.append((x,y,i+1)) a.append((1000000005,1000000005,n+1)) a.sort() for i in range(1,n+1): t=a[i] tp=a[i-1] tn=a[i+1] #shut the fuck up if (t[1]<=tp...
output
1
61,974
4
123,949