message
stringlengths
2
22.8k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
16
109k
cluster
float64
1
1
__index_level_0__
int64
32
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,777
1
91,554
Yes
output
1
45,777
1
91,555
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,778
1
91,556
Yes
output
1
45,778
1
91,557
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,779
1
91,558
Yes
output
1
45,779
1
91,559
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,780
1
91,560
Yes
output
1
45,780
1
91,561
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,781
1
91,562
No
output
1
45,781
1
91,563
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,782
1
91,564
No
output
1
45,782
1
91,565
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,783
1
91,566
No
output
1
45,783
1
91,567
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network β€” for each pair of different towns x and y, there is a bidire...
instruction
0
45,784
1
91,568
No
output
1
45,784
1
91,569
Provide a correct Python 3 solution for this coding contest problem. You are a teacher at Iazu High School is the Zuia Kingdom. There are $N$ cities and $N-1$ roads connecting them that allow you to move from one city to another by way of more than one road. Each of the roads allows bidirectional traffic and has a kno...
instruction
0
46,114
1
92,228
"Correct Solution: ``` import sys sys.setrecursionlimit(1000000) def main(): n, q = map(int, input().split()) edges = [[] for _ in range(n)] for _ in range(n - 1): u, v, w = map(int, input().split()) u -= 1 v -= 1 edges[u].append((v, w)) edges[v].append((u, w)) height = [None] * n dist ...
output
1
46,114
1
92,229
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,199
1
92,398
Tags: graphs Correct Solution: ``` def dfs(graph, i, s, n, mark): mark[i] = 1 if mark[s-1] == 1: return for j in range(n): if graph[i][j] == 1 and mark[j] == 0: dfs(graph, j, s, n, mark) n, s = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, inpu...
output
1
46,199
1
92,399
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,200
1
92,400
Tags: graphs Correct Solution: ``` n, s = input().split() n = int(n) s = int(s) a = input().split() b = input().split() for j in range(n): a[j] = int(a[j]) b[j] = int(b[j]) if a[0]==1: if a[s-1]==1: print("YES") elif b[s-1]==1: for i in range(s,n): if a[i]==1 and b[i]==1: print("YES") break else...
output
1
46,200
1
92,401
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,201
1
92,402
Tags: graphs Correct Solution: ``` inp = input().split() s = int(inp[0]) n = int(inp[1]) seq1 = input().split(" ") seq2 = input().split(" ") if seq1[0] == '0': print("NO") elif seq1[n - 1] == '1': print("YES") else: end = False for i in range(n, s): if seq1[i] == '1' and seq2[i] == '1': ...
output
1
46,201
1
92,403
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,202
1
92,404
Tags: graphs Correct Solution: ``` n,s = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] ans = 0 c = 0 if a[0] == 0: print("NO") elif a[s - 1] == 0: for station in a[s:]: if station == 1 and b[a.index(station, s + c)] == 1: if b[...
output
1
46,202
1
92,405
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,203
1
92,406
Tags: graphs Correct Solution: ``` n,s=map(int,input().split()) x=input().split() x1=input().split() men=8 if x1[s-1]=='1'and x[0]=='1': for i in range(s-1,n): if x[i]=='1'==x1[i]: print('YES') men-=1 break if men==8: if x[0] == '0' or x[s-1]==x1[s-1]=...
output
1
46,203
1
92,407
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,204
1
92,408
Tags: graphs Correct Solution: ``` n, s = list(map(int, input("").split(" "))) B = list(map(int, input("").split(" "))) A = list(map(int, input("").split(" "))) can_reach = False if(B[0] == 0): can_reach = False elif B[s-1] == 1: can_reach = True elif A[s-1] == 0: can_reach = False else: for i in range(s-1, len(B)...
output
1
46,204
1
92,409
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,205
1
92,410
Tags: graphs Correct Solution: ``` i = input n, s = map(int, i().split()) a = i().split() b = i().split() if a[0] == '0' or a[s-1] + b[s-1] == '00': print('NO') elif a[0] + a[s-1] == '11': print('YES') else: for i in range(s, n): if a[i] == b[i] == '1': print('YES') exit() else: print('NO') ```
output
1
46,205
1
92,411
Provide tags and a correct Python 3 solution for this coding contest problem. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is being built. This metro line contains n statio...
instruction
0
46,206
1
92,412
Tags: graphs Correct Solution: ``` tmp = input().split(' ') n = int(tmp[0]) s = int(tmp[1]) a = input().split(' ') b = input().split(' ') tmp = 0 if a[0] == '0': print("NO") elif a[s-1] == '1': print("YES") elif b[s-1] == '1': for i in range(s, n): if (a[i] == '1') & (b[i] == '1'): print("YES") tmp = 1 br...
output
1
46,206
1
92,413
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,207
1
92,414
Yes
output
1
46,207
1
92,415
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,208
1
92,416
Yes
output
1
46,208
1
92,417
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,209
1
92,418
Yes
output
1
46,209
1
92,419
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,210
1
92,420
Yes
output
1
46,210
1
92,421
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,211
1
92,422
No
output
1
46,211
1
92,423
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,212
1
92,424
No
output
1
46,212
1
92,425
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,213
1
92,426
No
output
1
46,213
1
92,427
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice's home. In the city in which Alice and Bob live, the first metro line is...
instruction
0
46,214
1
92,428
No
output
1
46,214
1
92,429
Provide tags and a correct Python 3 solution for this coding contest problem. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially located in it. To compare different cities Alex...
instruction
0
46,327
1
92,654
Tags: dfs and similar, dp, dsu, graphs, greedy, trees Correct Solution: ``` import sys input = sys.stdin.readline n,m=map(int,input().split()) W=[0]+list(map(int,input().split())) E=[tuple(map(int,input().split())) for i in range(m)] S=int(input()) ELIST=[[] for i in range(n+1)] EW=[0]*(n+1) for x,y in E: ELIST...
output
1
46,327
1
92,655
Provide tags and a correct Python 3 solution for this coding contest problem. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially located in it. To compare different cities Alex...
instruction
0
46,328
1
92,656
Tags: dfs and similar, dp, dsu, graphs, greedy, trees Correct Solution: ``` import sys input = sys.stdin.readline n,m=map(int,input().split()) W=[0]+list(map(int,input().split())) E=[tuple(map(int,input().split())) for i in range(m)] S=int(input()) ELIST=[[] for i in range(n+1)] EW=[0]*(n+1) for x,y in E: ELIST[...
output
1
46,328
1
92,657
Provide tags and a correct Python 3 solution for this coding contest problem. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially located in it. To compare different cities Alex...
instruction
0
46,329
1
92,658
Tags: dfs and similar, dp, dsu, graphs, greedy, trees Correct Solution: ``` from collections import defaultdict def get_neighbors(edges): neighbors = defaultdict(set, {}) for v1, v2 in edges: neighbors[v1].add(v2) neighbors[v2].add(v1) return dict(neighbors) def get_component(neighbors_m...
output
1
46,329
1
92,659
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially ...
instruction
0
46,330
1
92,660
No
output
1
46,330
1
92,661
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially ...
instruction
0
46,331
1
92,662
No
output
1
46,331
1
92,663
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially ...
instruction
0
46,332
1
92,664
No
output
1
46,332
1
92,665
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Alex decided to go on a touristic trip over the country. For simplicity let's assume that the country has n cities and m bidirectional roads connecting them. Alex lives in city s and initially ...
instruction
0
46,333
1
92,666
No
output
1
46,333
1
92,667
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,629
1
93,258
Tags: math Correct Solution: ``` from collections import defaultdict import math n=int(input()) a=list(map(int,input().split())) node=[a[0],1,0]# 10a+bx-10c toadd=a[0] xrange=[0,10]# a<=x<b # print(node,xrange) a=[0]+a for i in range(1,n+1): #after fuling at station i+1 if(node[0]>=a[i]-a[i-1]): node[0]...
output
1
46,629
1
93,259
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,630
1
93,260
Tags: math Correct Solution: ``` from re import * from sys import stderr def readint(): return int(input()) def readfloat(): return float(input()) def readarray(N, foo=input): return [foo() for i in range(N)] def readlinearray(foo=int): return map(foo, input().split()) def NOD(a, b): while b: ...
output
1
46,630
1
93,261
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,631
1
93,262
Tags: math Correct Solution: ``` n = int(input()) stops = list(map(int, input().split())) low = 10 high = stops[0] * 10 + 10 i = 0 for mile in range(1, stops[-1] + 1): if stops[i] == mile: high = min(high, (mile * 10 + 10) / (i + 1)) i += 1 else: low = max(low, (mile * 10 + 10) / (i + 1)) a = int((low...
output
1
46,631
1
93,263
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,632
1
93,264
Tags: math Correct Solution: ``` n = int(input()) stops = list(map(int, input().split())) low = 10 high = stops[0] * 10 + 10 i = 0 for mile in range(1, stops[-1] + 1): if stops[i] == mile: high = min(high, (mile * 10 + 10) / (i + 1)) i += 1 else: low = max(low, (mile * 10 + 10) / (i + 1)) a = int((low...
output
1
46,632
1
93,265
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,633
1
93,266
Tags: math Correct Solution: ``` n = int(input()) zap = list(map(int, input().split())) upperbound = float('inf') lowerbound = -float('inf') counter = 1 for item in zap: upperbound = min(upperbound, 10/counter + 10 * item / counter) counter += 1 k = 1 for item in zap: lowerbound = max(lowerbound, item *...
output
1
46,633
1
93,267
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,634
1
93,268
Tags: math Correct Solution: ``` #codeforces 48c: the race: math import math def readGen(trans): while 1: for x in input().split(): yield(trans(x)) readint=readGen(int) n=next(readint) a=[0]+[next(readint) for i in range(n)] p=max((n+1)*a[i]/i-1 for i in range(1,n+1)) q=min((n+1)*(a[i]+1)/i for i in range(1,n+...
output
1
46,634
1
93,269
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,635
1
93,270
Tags: math Correct Solution: ``` # ========= /\ /| |====/| # | / \ | | / | # | /____\ | | / | # | / \ | | / | # ========= / \ ===== |/====| # code def main(): n = int(input()) a = list(map(int ,input().split())) ...
output
1
46,635
1
93,271
Provide tags and a correct Python 3 solution for this coding contest problem. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” The Huff-puffer. So, Vasya leaves city A on the...
instruction
0
46,636
1
93,272
Tags: math Correct Solution: ``` eps=10**(-9) mn=10 mx=100000000 n=int(input()) arr=list(map(int,input().split())) for i in range(n): mn = max(mn,(arr[i]*10)/(i+1)) mx = min(mx,((arr[i]+1)*10)/(i+1)) ans1=((n+1)*mn)//10 ans2=((n+1)*(mx-eps))//10 if ans2>ans1: print('not unique') else: print('unique') ...
output
1
46,636
1
93,273
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” T...
instruction
0
46,637
1
93,274
No
output
1
46,637
1
93,275
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” T...
instruction
0
46,638
1
93,276
No
output
1
46,638
1
93,277
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” T...
instruction
0
46,639
1
93,278
No
output
1
46,639
1
93,279
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Every year a race takes place on the motorway between cities A and B. This year Vanya decided to take part in the race and drive his own car that has been around and bears its own noble name β€” T...
instruction
0
46,640
1
93,280
No
output
1
46,640
1
93,281
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n cities in the country. Two candidates are fighting for the post of the President. The elections are set in the future, and both candidates have already planned how they are going t...
instruction
0
47,042
1
94,084
No
output
1
47,042
1
94,085
Provide tags and a correct Python 3 solution for this coding contest problem. One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..." The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money...
instruction
0
47,301
1
94,602
Tags: greedy, math Correct Solution: ``` def solve(grownups, children): if grownups == 0 and children == 0: return [0, 0] if grownups == 0: return [] if children == 0: return [grownups, grownups] most = children + grownups - 1 least = grownups + max(0, children - grownups) ...
output
1
47,301
1
94,603
Provide tags and a correct Python 3 solution for this coding contest problem. One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..." The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money...
instruction
0
47,302
1
94,604
Tags: greedy, math Correct Solution: ``` a,b=map(int,input().split(' ')) if(b==0): print(a,a) elif(a==0): print("Impossible") elif(a>=b): print(a,a+b-1) elif(b>a): print(b,a+b-1) ```
output
1
47,302
1
94,605
Provide tags and a correct Python 3 solution for this coding contest problem. One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..." The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money...
instruction
0
47,303
1
94,606
Tags: greedy, math Correct Solution: ``` n, m = map(int, input().split()) if n == 0: if m == 0: print('0 0') else: print('Impossible') else: if m == 0: print(str(n) + ' ' +str(n)) # elif n == m: # print(str(max(n,m)) + ' ' + str(max(n,m) + 1)) else: print(st...
output
1
47,303
1
94,607
Provide tags and a correct Python 3 solution for this coding contest problem. One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..." The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money...
instruction
0
47,304
1
94,608
Tags: greedy, math Correct Solution: ``` n, m = map(int, input().split()) print(*[[n+m-min(m, n), [n,m+n-1][m>0]],['Impossible']][n==0 and m>0]) ```
output
1
47,304
1
94,609
Provide tags and a correct Python 3 solution for this coding contest problem. One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..." The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money...
instruction
0
47,305
1
94,610
Tags: greedy, math Correct Solution: ``` def f(l): n,m = l if n==0: return ['Impossible'] if m>0 else [0,0] return [max(m,n), n+m-1 if m>0 else n+m] l = list(map(int,input().split())) print(*f(l)) ```
output
1
47,305
1
94,611