message
stringlengths
2
65.1k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
0
108k
cluster
float64
14
14
__index_level_0__
int64
0
217k
Provide tags and a correct Python 3 solution for this coding contest problem. Vova has won n trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row. The beauty of the arrangement is the length of the longest subsegment consisting of golden trophies. Vova wants t...
instruction
0
37,773
14
75,546
Tags: greedy Correct Solution: ``` n = int(input()) s = input() l = [] i = res = c = 0 while i < n: g = 0 while i < n and s[i] == 'G': i += 1 g += 1 l.append(g) res = max(res, g) if g > 0: c += 1 g = 0 while i < n and s[i] == 'S': i += 1 g += 1 ...
output
1
37,773
14
75,547
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova has won n trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row. The beauty of the arrangement is the length of the longest subsegm...
instruction
0
37,779
14
75,558
Yes
output
1
37,779
14
75,559
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova has won n trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row. The beauty of the arrangement is the length of the longest subsegm...
instruction
0
37,782
14
75,564
No
output
1
37,782
14
75,565
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,860
14
75,720
Tags: dp, greedy, sortings Correct Solution: ``` import sys input = sys.stdin.readline for _ in range(int(input())): n = int(input()) e = list(map(int, input().split())) e.sort() p = 0 ans = 0 for i in range(n): p +=1 v = e[i] if p>=v: ans+=1 p = 0 print(ans) ```
output
1
37,860
14
75,721
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,861
14
75,722
Tags: dp, greedy, sortings Correct Solution: ``` import sys def main(): def input(): return sys.stdin.readline()[:-1] t = int(input()) for _ in range(t): n = int(input()) a = sorted(list(map(int,input().split()))) count = 0 ans = 0 for k in range(n): ...
output
1
37,861
14
75,723
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,862
14
75,724
Tags: dp, greedy, sortings Correct Solution: ``` from sys import stdin def inp(): return stdin.readline().strip() t = int(inp()) for _ in range(t): n = int(inp()) e = [int(x) for x in inp().split()] e.sort() x = list(set(e)) big = max(e) results = {} for i in e: if results.ge...
output
1
37,862
14
75,725
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,863
14
75,726
Tags: dp, greedy, sortings Correct Solution: ``` from sys import stdin, stdout input = stdin.readline print = stdout.write for _ in range(int(input())): n = int(input()) l=list(map(int,input().split())) l.sort() c=0 a=0 for i in l: c+=1 if i ==c: a+=1 c=0...
output
1
37,863
14
75,727
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,864
14
75,728
Tags: dp, greedy, sortings Correct Solution: ``` def solve(): input() inexp = list(map(int, input().split())) inexp.sort() group = [] group_num = 0 for x in inexp: if len(group) <= x : group.append(x) if len(group) == x: group = [] ...
output
1
37,864
14
75,729
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,865
14
75,730
Tags: dp, greedy, sortings Correct Solution: ``` from sys import stdin,stdout for testcases in range(int(stdin.readline())): n=int(stdin.readline()) arr=list(map(int,stdin.readline().split())) count=0 stacked_up=0 arr.sort() for i in arr: if stacked_up+1 ==i: count+=1 ...
output
1
37,865
14
75,731
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,866
14
75,732
Tags: dp, greedy, sortings Correct Solution: ``` import sys try: sys.stdin = open('Input.txt', 'r') sys.stdout = open('Output.txt', 'w') except: pass input = sys.stdin.readline for testCases in range(int(input())): n = int(input()) l = list(map(int,input().split())) l.sort() d = {} for i in l: if d.get(i)...
output
1
37,866
14
75,733
Provide tags and a correct Python 3 solution for this coding contest problem. Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explorers went into a forest, set up a camp and decided to split into groups to explore as much interesting locations as possible. Russell was tryin...
instruction
0
37,867
14
75,734
Tags: dp, greedy, sortings Correct Solution: ``` """ ~~ Author : Bhaskar ~~ Dated : 16~05~2020 """ import sys from collections import OrderedDict INT_MAX = sys.maxsize INT_MIN = -(sys.maxsize)-1 sys.setrecursionlimit(10**7) mod = 1000000007 def IOE(): sys.stdin = open("input.txt", "r") sys.stdout = open("out...
output
1
37,867
14
75,735
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A student's life is fraught with complications. Some Berland University students know this only too well. Having studied for two years, they contracted strong antipathy towards the chairperson o...
instruction
0
37,992
14
75,984
No
output
1
37,992
14
75,985
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A student's life is fraught with complications. Some Berland University students know this only too well. Having studied for two years, they contracted strong antipathy towards the chairperson o...
instruction
0
37,993
14
75,986
No
output
1
37,993
14
75,987
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A student's life is fraught with complications. Some Berland University students know this only too well. Having studied for two years, they contracted strong antipathy towards the chairperson o...
instruction
0
37,994
14
75,988
No
output
1
37,994
14
75,989
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A student's life is fraught with complications. Some Berland University students know this only too well. Having studied for two years, they contracted strong antipathy towards the chairperson o...
instruction
0
37,995
14
75,990
No
output
1
37,995
14
75,991
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,049
14
76,098
Tags: implementation Correct Solution: ``` l = list(map(int,input().split())) n = len(l) x = max(l , key= l.count) if l.count(x) < 4 : print('Alien') exit() a = [] for i in l : if i != x : a.append(i) #print(a) y = 2 - len(a) if len(a) < 2 : for i in range(y): a.append(x) #print(a) i...
output
1
38,049
14
76,099
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,050
14
76,100
Tags: implementation Correct Solution: ``` arr = list(map(int, input().split())) arr.sort() result = '' num = arr[0] count = 0 for i in arr: if i == num: count += 1 if count == 4: break else: if count == 4: break else: num = i co...
output
1
38,050
14
76,101
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,052
14
76,104
Tags: implementation Correct Solution: ``` li=list(map(int,input().split())) li.sort() s=set(li) if len(s)==1: print("Elephant") elif len(s)==2: flag=0 for i in s: if li.count(i)>3: flag=i break if flag: for i in s: if i!=flag: if li.co...
output
1
38,052
14
76,105
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,053
14
76,106
Tags: implementation Correct Solution: ``` inp = input().split() n = [int(x) for x in inp] numb = 0 map = {} mx = 0 for i in n: if(map.get(i) == None): map[i] = 1 else: map[i] += 1 mx = max(mx, map[i]) if(len(map) > 3 or mx < 4): print(str("Alien")) else: if(mx == 6 or (len(map) == ...
output
1
38,053
14
76,107
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,055
14
76,110
Tags: implementation Correct Solution: ``` # coding: utf-8 l = [int(i) for i in input().split()] ll = set(l) for s in ll: if l.count(s) >= 4: temp = list(l) for i in range(4): temp.remove(s) temp.sort() if temp[0] == temp[1]: print('Elephant') else: ...
output
1
38,055
14
76,111
Provide tags and a correct Python 3 solution for this coding contest problem. Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear f...
instruction
0
38,056
14
76,112
Tags: implementation Correct Solution: ``` data = [int(i) for i in input().split()] data.sort() if data.count(data[3]) < 4: print("Alien") else: t = data[3] for i in range(4): data.remove(t) if data[0] == data [1]: print("Elephant") else: print("Bear") ```
output
1
38,056
14
76,113
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,312
14
76,624
Tags: implementation Correct Solution: ``` a,b,c,n = map(int,input().split()) if a>=n or b>=n or a<c or b<c or a<0 or b<0: print("-1") exit(0) tot = (a+b-c) if tot>=n: print("-1") exit(0) print(n-tot) ```
output
1
38,312
14
76,625
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,313
14
76,626
Tags: implementation Correct Solution: ``` a, b, c, n = list(map(int, input().split())) # if n == 0: # print(-1) if c > a or c > b: print(-1) elif c >= n or a >= n or b >= n: print(-1) elif a + b - c < 0: print(-1) else: res = n-(a+b)+c if res > 0: print(res) else: print(-1)...
output
1
38,313
14
76,627
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,314
14
76,628
Tags: implementation Correct Solution: ``` A,B,C,N = map(int,input().split()) if A+B-C >= N or A < C or B < C: print(-1) exit() print(N-A-B+C) ```
output
1
38,314
14
76,629
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,315
14
76,630
Tags: implementation Correct Solution: ``` a, b, c, n = (int(x) for x in input().split()) if a + b - c >= n or a < c or b < c: print(-1) else: print(n - a - b + c) ```
output
1
38,315
14
76,631
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,316
14
76,632
Tags: implementation Correct Solution: ``` a,b,c,n=map(int,input().split()) if min(a,b)<c or n<max(a,b,c): print(-1) else: a-=c b-=c if n-a-b-c<1: print(-1) else: print (n-a-b-c) ```
output
1
38,316
14
76,633
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,317
14
76,634
Tags: implementation Correct Solution: ``` A, B, C, N = list(map(int, input().split())) res = N - (A+B-C) if res>=1 and min(A,B)>=C: print(res) else: print(-1) ```
output
1
38,317
14
76,635
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,318
14
76,636
Tags: implementation Correct Solution: ``` a, b, c, n = map(int, input().split()) n -= 1 d = n - a - b + c if c > n: print(-1) elif c > b or c > a: print(-1) elif d < 0: print(-1) else: print(d + 1) ```
output
1
38,318
14
76,637
Provide tags and a correct Python 3 solution for this coding contest problem. Each student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful and celebrated afte...
instruction
0
38,319
14
76,638
Tags: implementation Correct Solution: ``` a,b,c,n = map(int, input().split()) temp = n-a-b+c if(temp<=0 or temp>n or min(a,b)<c): print(-1) else: print(temp) ```
output
1
38,319
14
76,639
Provide a correct Python 3 solution for this coding contest problem. You are working on the development of the unique operating system "Unsgune 15" and are struggling to design a scheduler that determines performance. A scheduler is a program that expresses the processes to be executed in units called tasks and determ...
instruction
0
38,499
14
76,998
"Correct Solution: ``` def solve(): from sys import stdin f_i = stdin N, K = map(int, f_i.readline().split()) # Since min-heap is used, set the attribute to a negative value. F = [list(map(lambda x: -int(x), f_i.readline().split())) \ for i in range(N)] D = int(f_i.readli...
output
1
38,499
14
76,999
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,772
14
77,544
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` for _ in range(int(input())): n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] a.sort() b.sort() print(*a) print(*b) ```
output
1
38,772
14
77,545
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,773
14
77,546
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` '''input 2 3 1 8 5 8 4 5 3 1 7 5 6 1 2 ''' for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) a.sort() b.sort() print(*a) print(*b) ```
output
1
38,773
14
77,547
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,774
14
77,548
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` import math t = int(input()) for _ in range(t): n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) a.sort(); b.sort(); for i in range(n): print(a[i],end=" ") print() for i in range(n): print...
output
1
38,774
14
77,549
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,775
14
77,550
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` import os import heapq import sys import math import operator from collections import defaultdict from io import BytesIO, IOBase """def gcd(a,b): if b==0: return a else: return gcd(b,a%b)""" """def pw(a,b): ...
output
1
38,775
14
77,551
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,776
14
77,552
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) print(" ".join(list(map(str, sorted(a))))) print(" ".join(list(map(str, sorted(b))))) ```
output
1
38,776
14
77,553
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,777
14
77,554
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` for _ in range(int(input())): lens = int(input()) print(*sorted([int(x) for x in input().split()])) print(*sorted([int(x) for x in input().split()])) ```
output
1
38,777
14
77,555
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,778
14
77,556
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` # x=[3,5,6] # y=[3,2,1] for _ in range(int(input())): m=int(input()) x=[int(i) for i in input().split()] y=[int(i) for i in input().split()] # sumb=[] # i=0 # while(i!=len(x)): # #print(i) # if x[i...
output
1
38,778
14
77,557
Provide tags and a correct Python 3 solution for this coding contest problem. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different), * the i-th bracelet has a brightness b_i,...
instruction
0
38,779
14
77,558
Tags: brute force, constructive algorithms, greedy, sortings Correct Solution: ``` t = int(input()) while t: n = int(input()) a = list(map(int, input().split(' '))) b = list(map(int, input().split(' '))) a.sort() b.sort() for i in a: print(i, end = ' ') print("") for i in b: ...
output
1
38,779
14
77,559
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,780
14
77,560
Yes
output
1
38,780
14
77,561
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,781
14
77,562
Yes
output
1
38,781
14
77,563
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,782
14
77,564
Yes
output
1
38,782
14
77,565
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,783
14
77,566
Yes
output
1
38,783
14
77,567
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,784
14
77,568
No
output
1
38,784
14
77,569
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,785
14
77,570
No
output
1
38,785
14
77,571
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,786
14
77,572
No
output
1
38,786
14
77,573
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Kuroni has n daughters. As gifts for them, he bought n necklaces and n bracelets: * the i-th necklace has a brightness a_i, where all the a_i are pairwise distinct (i.e. all a_i are different...
instruction
0
38,787
14
77,574
No
output
1
38,787
14
77,575
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he...
instruction
0
38,805
14
77,610
Tags: implementation Correct Solution: ``` """ https://codeforces.com/problemset/problem/136/A """ numberOfFriends = int(input()) giftToIth = [int(ip) for ip in input().split()] returnGiftToI = [] for i in range(1,numberOfFriends+1): returnGiftToI.append(str(giftToIth.index(i)+1)) print(" ".join(returnGiftToI)...
output
1
38,805
14
77,611
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he...
instruction
0
38,806
14
77,612
Tags: implementation Correct Solution: ``` n=int(input()) list1=list(map(int,input().split())) dict={} for item in list1: dict[item]=list1.index(item)+1 for i in range(1,n+1): print(dict[i],end=' ') ```
output
1
38,806
14
77,613
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he...
instruction
0
38,807
14
77,614
Tags: implementation Correct Solution: ``` n=int(input()) l=list(map(int,input().split())) l1=[0]*n for i in range(n): l1[l[i]-1]=i+1 print(*l1) ```
output
1
38,807
14
77,615
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he...
instruction
0
38,808
14
77,616
Tags: implementation Correct Solution: ``` import operator n = int(input()) p = list(map(int, input().split())) prize = [None]*n for i in range(n): prize[p[i] - 1] = i+1 for x in prize: print(x, end = " ") ```
output
1
38,808
14
77,617