message
stringlengths
2
39.6k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
450
109k
cluster
float64
2
2
__index_level_0__
int64
900
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,920
2
81,840
Yes
output
1
40,920
2
81,841
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,921
2
81,842
Yes
output
1
40,921
2
81,843
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,922
2
81,844
No
output
1
40,922
2
81,845
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,923
2
81,846
No
output
1
40,923
2
81,847
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,924
2
81,848
No
output
1
40,924
2
81,849
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became rea...
instruction
0
40,925
2
81,850
No
output
1
40,925
2
81,851
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Petya found spell scrolls and now he is about to u...
instruction
0
41,553
2
83,106
Tags: greedy, implementation Correct Solution: ``` class Scroll: def __init__(self, id, power, damage): self.id = id self.power = power self.damage = damage self.active = False num_scrolls, boss_max, regenerate = map(int, input().split()) scrolls = [Scroll(i+1, *map(int, input().split())) for i in range(num_s...
output
1
41,553
2
83,107
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Petya found spell scrolls and now he is about to u...
instruction
0
41,554
2
83,108
Tags: greedy, implementation Correct Solution: ``` spell_used = 0 parameters = input().split() num_spell = int(parameters[0]) max_pow = int(parameters[1]) reg_rate = int(parameters[2]) input_spell = [0 for i in range(num_spell)] spell = [0 for i in range(num_spell)] power = [0 for i in range(num_spell)] dmg = [0 for i ...
output
1
41,554
2
83,109
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Petya found spell scrolls and now he is about to u...
instruction
0
41,555
2
83,110
Tags: greedy, implementation Correct Solution: ``` class Scroll: def __init__(self, id, power, damage): self.id = id self.power = power self.damage = damage self.active = False num_scrolls, boss_max, regenerate = map(int, input().split()) scrolls = [Scroll(i+1, *map(int, input().split())) for i in range(num_s...
output
1
41,555
2
83,111
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Petya found spell scrolls and now he is about to u...
instruction
0
41,556
2
83,112
Tags: greedy, implementation Correct Solution: ``` import itertools import math N, x, y = [int(n) for n in input().split()] pills = [] for i in range(N): pills.append(tuple(int(n) for n in input().split()) + (i+1,)) pills.sort() rques = x qauto = 0 time = 0 used = [] possible = set() while rques > 0: ...
output
1
41,556
2
83,113
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Petya found spell scrolls and now he is about to u...
instruction
0
41,557
2
83,114
Tags: greedy, implementation Correct Solution: ``` import itertools import math N, maxhealth, reg = [int(x) for x in input().split()] scrolls = [] for i in range(N): scrolls.append(tuple(int(x) for x in input().split()) + (i+1,)) scrolls.sort() health = maxhealth dmg = 0 timer = 0 used = [] possible = set() while...
output
1
41,557
2
83,115
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Pet...
instruction
0
41,558
2
83,116
No
output
1
41,558
2
83,117
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Pet...
instruction
0
41,559
2
83,118
No
output
1
41,559
2
83,119
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Pet...
instruction
0
41,560
2
83,120
No
output
1
41,560
2
83,121
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya’s elder brother Petya loves playing computer games. In one of his favourite computer games Petya reached the final level where a fight with the boss take place. While playing the game Pet...
instruction
0
41,561
2
83,122
No
output
1
41,561
2
83,123
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,698
2
83,396
Yes
output
1
41,698
2
83,397
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,699
2
83,398
Yes
output
1
41,699
2
83,399
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,700
2
83,400
No
output
1
41,700
2
83,401
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,701
2
83,402
No
output
1
41,701
2
83,403
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,702
2
83,404
No
output
1
41,702
2
83,405
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course, Vlad immediately bought only to find out his computer is too old f...
instruction
0
41,703
2
83,406
No
output
1
41,703
2
83,407
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,109
2
84,218
Tags: implementation Correct Solution: ``` from decimal import Decimal n, m, k = input().split() k = Decimal(k) n,m = int(n),int(m) dic = {} cnt = 0 for _ in range(n): name, exp = input().split() exp = int(exp) exp = int(exp * k) if exp < 100: continue else: dic[name] = exp c...
output
1
42,109
2
84,219
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,110
2
84,220
Tags: implementation Correct Solution: ``` from collections import Counter n, m, k = input().split() k, c = int(k.split('.')[1]), Counter() for i in range(int(n)): s, e = input().split() e = int(e) * k // 100 if e >= 100: c[s] = e for i in range(int(m)): c[input()] += 0 print(len(c)) print('\n'....
output
1
42,110
2
84,221
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,111
2
84,222
Tags: implementation Correct Solution: ``` n,m,k=list(map(float,input().split())) n=int(n) m=int(m) LIST_A=set([]) LIST_B=set([]) SKILLS=[] d={} for i in range(n): skills,power=list(input().split()) LIST_A.add(skills) SKILLS.append([skills,power]) d[skills]=power # print(SKILLS) # print(d) TRANS=[]...
output
1
42,111
2
84,223
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,112
2
84,224
Tags: implementation Correct Solution: ``` a=input().split() n,m,k=int(a[0]),int(a[1]),int(a[2].split('.')[1]) b={} for _ in range(n): a=input().split() c=int(a[1])*k/100 if c>=100: b[a[0]]=c for _ in range(m): d=input() if not (d in b): b[d]=0 print(len(b)) for e in sorted(b): print(e,int(b[e])...
output
1
42,112
2
84,225
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,113
2
84,226
Tags: implementation Correct Solution: ``` import math n,m,k=input().split() n=int(n);m=int(m);k=float(k) ans=[];re=[] for i in range(n): q=0 x,y = input().split() q += (.99999 <= (math.modf(int(y)*k)[0])) if int(int(y)*k)+q > 99 : ans.append([x , int(int(y)*k)+q]) re.append(x) for j in ...
output
1
42,113
2
84,227
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,114
2
84,228
Tags: implementation Correct Solution: ``` n,m,k=input().split() n,m=int(n),int(m) k=int(k[2:]) d={} d2={} ans=[] for i in range(n): a,b=input().split() # print ((int(b)*int(str(k)[2:]))/100) # print ((int(b)),str(k),str(k)[2:],int(str(k)[2:]),int(b)*int(str(k)[2:]),int(b)*int(str(k)[2:])) if (int(b)*k/100)>=100: ...
output
1
42,114
2
84,229
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,115
2
84,230
Tags: implementation Correct Solution: ``` #!/usr/bin/env python3 ESP = 1e-7 n, m, k = input().rstrip().split() n, m, k = int(n), int(m), float(k) cur = {} for i in range(n): skill, exp = input().rstrip().split() exp = int(int(exp) * k + ESP) if exp >= 100: cur[skill] = exp for i in range(m): ...
output
1
42,115
2
84,231
Provide tags and a correct Python 3 solution for this coding contest problem. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he cannot use it. The skill level is represented as...
instruction
0
42,116
2
84,232
Tags: implementation Correct Solution: ``` import sys from itertools import * from math import * def solve(): n, m, k = input().split() n = int(n) m = int(m) k = int(k[2:]) skills = {} for i in range(n): name, level = input().split() level = int(level) newlevel = (k * lev...
output
1
42,116
2
84,233
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,117
2
84,234
Yes
output
1
42,117
2
84,235
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,118
2
84,236
Yes
output
1
42,118
2
84,237
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,119
2
84,238
Yes
output
1
42,119
2
84,239
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,120
2
84,240
Yes
output
1
42,120
2
84,241
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,121
2
84,242
No
output
1
42,121
2
84,243
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,122
2
84,244
No
output
1
42,122
2
84,245
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,123
2
84,246
No
output
1
42,123
2
84,247
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In Disgaea as in most role-playing games, characters have skills that determine the character's ability to use certain weapons or spells. If the character does not have the necessary skill, he c...
instruction
0
42,124
2
84,248
No
output
1
42,124
2
84,249
Provide tags and a correct Python 3 solution for this coding contest problem. Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar. The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got a sacred plate with a magic integer on it. The translation from Old Bea...
instruction
0
42,416
2
84,832
Tags: dp Correct Solution: ``` c = '0123456789' F = {c[a] + c[b]: (c[10 - a + b], 1) if a > b else (c[10 - a], 2) for a in range(1, 10) for b in range(10)} for b in range(1, 10): F['0' + c[b]] = ('0', 1) F['00'] = ('0', 0) def f(x): global F if x in F: return F[x] a, b, y, s = int(x[0]), int(x[1]), x[2: ],...
output
1
42,416
2
84,833
Provide tags and a correct Python 3 solution for this coding contest problem. Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar. The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got a sacred plate with a magic integer on it. The translation from Old Bea...
instruction
0
42,417
2
84,834
Tags: dp Correct Solution: ``` memoization_table = {} def compute_count(previous_max, rest): global memoization_table original_rest = rest if (previous_max, rest) in memoization_table: return memoization_table[(previous_max, rest)] num_digits = len(str(rest)) if num_digits == 1...
output
1
42,417
2
84,835
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar. The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got a sacred plate with a ma...
instruction
0
42,418
2
84,836
No
output
1
42,418
2
84,837
Provide a correct Python 3 solution for this coding contest problem. After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to remember a legend of the foggy island, which he had heard ...
instruction
0
42,843
2
85,686
"Correct Solution: ``` from collections import defaultdict class UnionFind(): def __init__(self, n): self.parent = list(range(n)) self.rank = [0] * n def find(self, x): if self.parent[x] == x: return x else: self.parent[x] = self.find(self.parent[x]) ...
output
1
42,843
2
85,687
Provide a correct Python 3 solution for this coding contest problem. After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to remember a legend of the foggy island, which he had heard ...
instruction
0
42,844
2
85,688
"Correct Solution: ``` from collections import deque import sys readline = sys.stdin.readline write = sys.stdout.write def solve(): N, p1, p2 = map(int, readline().split()) if N == p1 == p2 == 0: return False P = p1 + p2 G = [[] for i in range(P)] for i in range(N): x, y, a = readlin...
output
1
42,844
2
85,689
Provide a correct Python 3 solution for this coding contest problem. After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to remember a legend of the foggy island, which he had heard ...
instruction
0
42,845
2
85,690
"Correct Solution: ``` import sys sys.setrecursionlimit(10000000) MOD = 10 ** 9 + 7 INF = 10 ** 15 class UnionFind(): def __init__(self,n): self.n = n self.parents = [-1]*n def find(self,x): #根を見つける、繋ぎ直す if self.parents[x] < 0: return x else: self.parent...
output
1
42,845
2
85,691
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to re...
instruction
0
42,846
2
85,692
No
output
1
42,846
2
85,693
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to re...
instruction
0
42,847
2
85,694
No
output
1
42,847
2
85,695
Provide tags and a correct Python 3 solution for this coding contest problem. You are playing a game where your character should overcome different obstacles. The current problem is to come down from a cliff. The cliff has height h, and there is a moving platform on each height x from 1 to h. Each platform is either ...
instruction
0
43,037
2
86,074
Tags: dp, greedy, math Correct Solution: ``` for q in range(int(input())): h,n=map(int,input().split()) p=list(map(int,input().split())) p.append(0) ans=0 i=1 while i<n: if p[i]==p[i+1]+1: i+=2 else: i+=1 ans+=1 print(ans) ```
output
1
43,037
2
86,075
Provide tags and a correct Python 3 solution for this coding contest problem. You are playing a game where your character should overcome different obstacles. The current problem is to come down from a cliff. The cliff has height h, and there is a moving platform on each height x from 1 to h. Each platform is either ...
instruction
0
43,038
2
86,076
Tags: dp, greedy, math Correct Solution: ``` # -*- coding: utf-8 -*- import sys def input(): return sys.stdin.readline().strip() def list2d(a, b, c): return [[c] * b for i in range(a)] def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)] def list4d(a, b, c, d, e): return [[[[e] * d for j in ...
output
1
43,038
2
86,077
Provide tags and a correct Python 3 solution for this coding contest problem. You are playing a game where your character should overcome different obstacles. The current problem is to come down from a cliff. The cliff has height h, and there is a moving platform on each height x from 1 to h. Each platform is either ...
instruction
0
43,039
2
86,078
Tags: dp, greedy, math Correct Solution: ``` q = int(input()); size = 2*100000+1; res = []; p = [0 for i in range(size)]; d = [0 for i in range(size)]; for k in range(0, q): h, n = [int(x) for x in input().split()]; p = list(map(int, input().split())); d[0] = 0; d[1] = 1; for i in range(2, n): ...
output
1
43,039
2
86,079
Provide tags and a correct Python 3 solution for this coding contest problem. You are playing a game where your character should overcome different obstacles. The current problem is to come down from a cliff. The cliff has height h, and there is a moving platform on each height x from 1 to h. Each platform is either ...
instruction
0
43,040
2
86,080
Tags: dp, greedy, math Correct Solution: ``` from math import * t = int(input()) for i in range(t): n,r = map(int,input().split()) l = list(map(int,input().split())) l.append(0) l = l[::-1] if(n <= 2): print(0) else: ct = 0 i = r while(i > 1): #print(l[i],end = " ") if(l[i] - l[i-1] == 1 and l[i] - ...
output
1
43,040
2
86,081
Provide tags and a correct Python 3 solution for this coding contest problem. You are playing a game where your character should overcome different obstacles. The current problem is to come down from a cliff. The cliff has height h, and there is a moving platform on each height x from 1 to h. Each platform is either ...
instruction
0
43,041
2
86,082
Tags: dp, greedy, math Correct Solution: ``` import sys import itertools import math import collections from collections import Counter ######################### # imgur.com/Pkt7iIf.png # ######################### def pow(x, y, mod): r = 1 x = x % mod while y > 0: if y & 1: r = (r * x)...
output
1
43,041
2
86,083