message
stringlengths
2
20.1k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
1.95k
109k
cluster
float64
17
17
__index_level_0__
int64
3.91k
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A multi-subject competition is coming! The competition has m different subjects participants can choose from. That's why Alex (the coach) should form a competition delegation among his students....
instruction
0
20,317
17
40,634
No
output
1
20,317
17
40,635
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,914
17
41,828
Tags: greedy, sortings Correct Solution: ``` from statistics import mean n = int(input()) m = list(map(int, input().split())) def roundTraditional(val,digits): return round(val+10**(-len(str(val))-1), digits) m.sort() i = 0 while roundTraditional(mean(m), 0) < 5: m[i] = 5 i += 1 print(i) ```
output
1
20,914
17
41,829
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,915
17
41,830
Tags: greedy, sortings Correct Solution: ``` n = int(input()) grades = [int(x) * 2 for x in input().split()] res = sum(grades) target = 9 * len(grades) grades.sort() for i, grade in enumerate(grades): if res >= target: print(i) break else: res += 10 - grade else: print(len(grades...
output
1
20,915
17
41,831
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,916
17
41,832
Tags: greedy, sortings Correct Solution: ``` import sys import math import itertools import collections def ii(): return int(input()) def mi(): return map(int, input().split()) def li(): return list(map(int, input().split())) def lcm(a, b): return abs(a * b) // math.gcd(a, b) def wr(arr): return ' '.join(map(str, arr...
output
1
20,916
17
41,833
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,917
17
41,834
Tags: greedy, sortings Correct Solution: ``` def result(a): b = sorted(a) summa = sum(a) m = len(a) count = 0 while not summa * 10 >= m * 45: summa += 5 - b[count] count += 1 return count lt = int(input()) lst = [int(i) for i in input().split()] print(result(lst)) ```
output
1
20,917
17
41,835
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,918
17
41,836
Tags: greedy, sortings Correct Solution: ``` n=int(input()) li=[int(x) for x in input().split()] av=sum(li)/n if av>=4.5: print(0) exit() else: two=li.count(2) three=li.count(3) four=li.count(4) five=li.count(5) ccc=0 while True: if two!=0: two-=1 five+=1 ccc+=1 elif three !=0: three-=1 five+...
output
1
20,918
17
41,837
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,919
17
41,838
Tags: greedy, sortings Correct Solution: ``` import math def my_rounder(fl): fl_str = str(fl) index = fl_str.find(".") decimal = fl_str[index + 1:] int_decimal = int(decimal) int_part = int(fl_str[:index]) thousand = int("1" + "0" * len(decimal)) if thousand - int_decimal > int_decimal: ...
output
1
20,919
17
41,839
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,920
17
41,840
Tags: greedy, sortings Correct Solution: ``` n = int(input()) list =list(map(int, input().split())) # print(list) mean = 1 # sum = 0 # count = 0 # listcopy =[] # for i in range(len(list)): # sum = sum + list[i] # listcopy.append(list[i]) # mean = sum/len(list) list.sort() # print(sum) # print(mean) # listcopy....
output
1
20,920
17
41,841
Provide tags and a correct Python 3 solution for this coding contest problem. Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and studen...
instruction
0
20,921
17
41,842
Tags: greedy, sortings Correct Solution: ``` # R = lambda: map(int, input().split()) R = lambda: map(lambda x: int(x)*2, input().split()) n = int(input()) arr = list(R()) arr.sort() ans = 0 s = sum(arr) while s < 9*n: s += 10 - arr[ans] ans += 1 print(ans) ```
output
1
20,921
17
41,843
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,082
17
42,164
"Correct Solution: ``` N = int(input()) score = [input().split() for _ in range(N)] players = [0]*N for play in list(zip(*score)): for i, p in enumerate(play): if play.count(p) == 1: players[i] += int(p) print(*players, sep='\n') ```
output
1
21,082
17
42,165
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,083
17
42,166
"Correct Solution: ``` N = int(input()) score = [list(map(int, input().split())) for _ in range(N)] players = [0 for _ in range(N)] for play in list(zip(*score)): for i, p in enumerate(play): if play.count(p) == 1: players[i] += p print(*players, sep='\n') ```
output
1
21,083
17
42,167
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,084
17
42,168
"Correct Solution: ``` n = int(input()) l = [list(map(int,input().split())) for i in range(n)] A = [l[i][0] for i in range(n)] B = [l[i][1] for i in range(n)] C = [l[i][2] for i in range(n)] p = [0 for i in range(n)] for i in range(n): if A.count(l[i][0]) < 2: p[i] += l[i][0] if B.count(l[i][1]) < 2: ...
output
1
21,084
17
42,169
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,085
17
42,170
"Correct Solution: ``` n = int(input()) a = [] b = [] c = [] for i in range(n): x,y,z = map(int, input().split()) a.append(x) b.append(y) c.append(z) for i in range(n): score = 0 if a.count(a[i]) == 1: score += a[i] if b.count(b[i]) == 1: score += b[i] if c.count(c[i])...
output
1
21,085
17
42,171
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,086
17
42,172
"Correct Solution: ``` num = int(input()) P =[] L = [[],[],[]] for _ in range(num): p = [int(x) for x in input().split()] P.append(p) for i in range(3): L[i].append(p[i]) for p in P: sum = 0 for i in range(3): if L[i].count(p[i]) < 2: sum += p[i] print(sum) ```
output
1
21,086
17
42,173
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,087
17
42,174
"Correct Solution: ``` N = int(input()) all_game = [[int(j) for j in input().split()] for i in range(N)] point = [0] * N for g_i in range(3): g = [int(no[g_i]) for no in all_game] dic = {} for x in g: if x not in dic: dic[x] = 1 else: dic[x] += 1 for p_i in range...
output
1
21,087
17
42,175
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,088
17
42,176
"Correct Solution: ``` def main(): N = int(input()) a = [] for _ in range(N): a.append(list(map(int, input().split()))) n = [] c1 = 0 for _ in range(3): hoge = [] for x in range(N): hoge.append(a[x][c1]) c1 += 1 n.append(hoge) b = [0] * ...
output
1
21,088
17
42,177
Provide a correct Python 3 solution for this coding contest problem. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the card and submits it. Each player gets the same score as ...
instruction
0
21,089
17
42,178
"Correct Solution: ``` n = int(input()) arr = [input().split() for _ in range(n)] ans = [[-1 for _ in range(3)] for _ in range(n)] for i in range(3): for j in range(n-1): if ans[j][i] == -1: for k in range(j+1,n): if arr[j][i] == arr[k][i]: ans[j][i] = 0 ...
output
1
21,089
17
42,179
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the ...
instruction
0
21,090
17
42,180
Yes
output
1
21,090
17
42,181
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the ...
instruction
0
21,091
17
42,182
Yes
output
1
21,091
17
42,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the ...
instruction
0
21,092
17
42,184
Yes
output
1
21,092
17
42,185
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the ...
instruction
0
21,093
17
42,186
Yes
output
1
21,093
17
42,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. problem JOI decided to play a game with his friends. N players participate in this game. The rules for a single game are as follows: Each player writes a favorite integer from 1 to 100 on the ...
instruction
0
21,094
17
42,188
No
output
1
21,094
17
42,189
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,281
17
42,562
Tags: brute force, greedy Correct Solution: ``` import sys input = sys.stdin.readline from collections import Counter N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = Counter(A) ans = 0 P = set(list(range(N))) for bit, count in C.items(): if count == 1: continue mus...
output
1
21,281
17
42,563
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,282
17
42,564
Tags: brute force, greedy Correct Solution: ``` n = int(input()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] aSet = set() duplicates = set() for ai in a: if ai in aSet: duplicates.add(ai) aSet.add(ai) total = 0 for i, ai in enumerate(a): if ai in duplicates: ...
output
1
21,282
17
42,565
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,283
17
42,566
Tags: brute force, greedy Correct Solution: ``` n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) d = {} for i in a: if i in d: d[i]+=1 if i not in d: d[i] = 1 rez = 0 g = [] for i in d: if d[i]>1: g.append(i) for i in range(n): if d[a[i]]>1...
output
1
21,283
17
42,567
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,284
17
42,568
Tags: brute force, greedy Correct Solution: ``` ii=lambda:int(input()) kk=lambda:map(int,input().split()) ll=lambda:list(kk()) n=ii() vals = zip(kk(), kk()) d = {} for v in vals: if v[0] not in d: d[v[0]]=[] d[v[0]].append(v[1]) d2 = {k:sum(d[k]) for k in d} maxs = 0 if 0 not in d: d[0],d2[0]=[0],0 ls = sorted(d.key...
output
1
21,284
17
42,569
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,285
17
42,570
Tags: brute force, greedy Correct Solution: ``` from sys import * n=int(stdin.readline()) a=list(map(int,stdin.readline().split())) b=list(map(int,stdin.readline().split())) gp=[] ans=[] for i in range(n): if(a.count(a[i])>1): if(a[i] not in gp): gp.append(a[i]) ans.append(b[i]) if(len(gp)==0): stdout.write(...
output
1
21,285
17
42,571
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,286
17
42,572
Tags: brute force, greedy Correct Solution: ``` from collections import defaultdict n = int(input().split()[0]) a = list(map(int, input().split())) b = list(map(int, input().split())) types = defaultdict(list) for i in range(n): types[a[i]].append(b[i]) res, selected = 0, set() for k, v in types.items(): if ...
output
1
21,286
17
42,573
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,287
17
42,574
Tags: brute force, greedy Correct Solution: ``` from collections import Counter def main(): n=int(input()) A=tuple(map(int,input().split())) B=tuple(map(int,input().split())) C=Counter(A) if C.most_common()[0][1]==1: return 0 skill=set() for key,cnt in C.most_common(): if cn...
output
1
21,287
17
42,575
Provide tags and a correct Python 3 solution for this coding contest problem. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other. Let's focus on the students. They are indexed...
instruction
0
21,288
17
42,576
Tags: brute force, greedy Correct Solution: ``` def bit(used,b): count=0 for num in used: for i in range(b.bit_length()+1): if (1<<i)&num==0 and (1<<i)&b: count+=1 break if count==len(used): return True else: return False def f(a,b): ...
output
1
21,288
17
42,577
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,289
17
42,578
Yes
output
1
21,289
17
42,579
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,290
17
42,580
Yes
output
1
21,290
17
42,581
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,291
17
42,582
Yes
output
1
21,291
17
42,583
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,292
17
42,584
Yes
output
1
21,292
17
42,585
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,293
17
42,586
No
output
1
21,293
17
42,587
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,294
17
42,588
No
output
1
21,294
17
42,589
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,295
17
42,590
No
output
1
21,295
17
42,591
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Marcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other....
instruction
0
21,296
17
42,592
No
output
1
21,296
17
42,593
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Recently a lot of students were enrolled in Berland State University. All students were divided into groups according to their education program. Some groups turned out to be too large to attend...
instruction
0
21,297
17
42,594
No
output
1
21,297
17
42,595
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,314
17
42,628
Tags: implementation Correct Solution: ``` t = int(input()) for i in range(t): n, m = map(int, input().split()) arr = list(map(int, input().split())) ts = sum(arr) if ts >= m: print(m) elif ts < m: print(ts) ```
output
1
21,314
17
42,629
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,315
17
42,630
Tags: implementation Correct Solution: ``` from math import factorial from collections import Counter from heapq import heapify, heappop, heappush import os import sys from io import BytesIO, IOBase # region fastio BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd =...
output
1
21,315
17
42,631
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,316
17
42,632
Tags: implementation Correct Solution: ``` def solve(): n, m = map(int, input().split()) l = map(int, input().split()) s = sum(l) for x in range(m, -1, -1): if 0 <= (s - x) <= (n-1) * m: return x n = int(input()) for _ in range(n): print(solve()) ```
output
1
21,316
17
42,633
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,317
17
42,634
Tags: implementation Correct Solution: ``` def program(): n,m=map(int, input().split()) l=list(map(int, input().split())) print(min(m,sum(l))) t=int(input()) for i in range(t): program() ```
output
1
21,317
17
42,635
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,318
17
42,636
Tags: implementation Correct Solution: ``` t=input() for _ in range(int(t)): n,m=map(int,input().split()) a=input().split() ans=0 for i in range(n): ans+=int(a[i]) ans=min(ans,m) print(ans) ```
output
1
21,318
17
42,637
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,319
17
42,638
Tags: implementation Correct Solution: ``` for i in range(int(input())): n,mm=map(int,input().split()) s=0 h=0 li=list(map(int,input().split())) for i in range(len(li)): s=s+li[i] if(s==abs(s)): h=1 s=s-li[0] m=mm-li[0] if(h==1): if(m>=s): print(s+...
output
1
21,319
17
42,639
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,320
17
42,640
Tags: implementation Correct Solution: ``` tc = int(input()) t=0 while t<tc : t+=1 i = input().split() a=int(i[0]) m=int(i[1]) x=input().split() j=0 sum=0 while j<a : sum+=int(x[j]) j+=1 if(sum>m): sum = m print(sum) ```
output
1
21,320
17
42,641
Provide tags and a correct Python 3 solution for this coding contest problem. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all students. You can change each student's score as...
instruction
0
21,321
17
42,642
Tags: implementation Correct Solution: ``` t = int(input()) for _ in range(t): n, m = map(int, input().split()) arr = list(map(int, input().split())) for i in range(1, n): arr[0] += arr[i] if arr[0] > m: arr[i] = arr[0] - m arr[0] = m break else: ...
output
1
21,321
17
42,643
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. n students are taking an exam. The highest possible score at this exam is m. Let a_{i} be the score of the i-th student. You have access to the school database which stores the results of all st...
instruction
0
21,328
17
42,656
No
output
1
21,328
17
42,657
Provide tags and a correct Python 3 solution for this coding contest problem. Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corre...
instruction
0
21,740
17
43,480
Tags: implementation, strings Correct Solution: ``` a=input() n=0 o=0 j=a[0] if (j=='0'): n+=1 else: o+=1 res=False for i in a: if (i=='0'): if (j=='0'): n+=1 else: n=1 if (o>6): res=True o=0 else: if (j=='0'): ...
output
1
21,740
17
43,481
Provide tags and a correct Python 3 solution for this coding contest problem. Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corre...
instruction
0
21,741
17
43,482
Tags: implementation, strings Correct Solution: ``` class Solution(object): def __init__(self): self.data = None self.out_map = { True: 'YES', False: 'NO' } self.answer = None self.get_data() self.solve() self.print_answer() pass ...
output
1
21,741
17
43,483