message stringlengths 2 22.7k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 145 109k | cluster float64 9 9 | __index_level_0__ int64 290 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,055 | 9 | 164,110 |
Yes | output | 1 | 82,055 | 9 | 164,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,056 | 9 | 164,112 |
Yes | output | 1 | 82,056 | 9 | 164,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,057 | 9 | 164,114 |
Yes | output | 1 | 82,057 | 9 | 164,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,058 | 9 | 164,116 |
Yes | output | 1 | 82,058 | 9 | 164,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,059 | 9 | 164,118 |
No | output | 1 | 82,059 | 9 | 164,119 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,060 | 9 | 164,120 |
No | output | 1 | 82,060 | 9 | 164,121 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,061 | 9 | 164,122 |
No | output | 1 | 82,061 | 9 | 164,123 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows:
<image>
The cakeminator is ... | instruction | 0 | 82,062 | 9 | 164,124 |
No | output | 1 | 82,062 | 9 | 164,125 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,580 | 9 | 165,160 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n = int(input())
l = tuple(map(int,input().split()))
r = tuple(map(int,input().split()))
s = [ (i,sum(v)) for i,(v) in enumerate(zip(l,r)) ]
ss = sorted(s, key= lambda a:a[1] )
candies = [0]*n
for p in ss:
candies[p[0]] = n-p[1]
ll = [0]
for i in... | output | 1 | 82,580 | 9 | 165,161 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,581 | 9 | 165,162 |
Tags: constructive algorithms, implementation
Correct Solution:
```
import sys
amount = int(input())
first_inv = [int(s) for s in input().split()]
second_inv = [int(s) for s in input().split()]
"""for i in range(len(first_inv)):
if first_inv[i] > i:
print('NO')
sys.exit(0)
for i in range(l... | output | 1 | 82,581 | 9 | 165,163 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,582 | 9 | 165,164 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n=int(input())
l=[int(x) for x in input().split()]
r =[int(x) for x in input().split()]
flag=1
a=[n-l[i]-r[i] for i in range(n)]
for i in range(n):
cl=0
cr=0
for j in range(i):
if a[j]>a[i]:
cl+=1
for k in range(i+1,... | output | 1 | 82,582 | 9 | 165,165 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,583 | 9 | 165,166 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n = int(input())
l = [int(t) for t in input().split(' ')]
r = [int(t) for t in input().split(' ')]
a = [None] * n
maxcandy = n
while True:
maxcount = 0
for i in range(n):
if a[i] is None and l[i] == 0 and r[i] == 0:
a[i] =... | output | 1 | 82,583 | 9 | 165,167 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,584 | 9 | 165,168 |
Tags: constructive algorithms, implementation
Correct Solution:
```
def get_input_list():
return list(map(int, input().split()))
n = int(input())
l = get_input_list()
r = get_input_list()
a = [0 for _ in range(n)]
m = []
m_ = []
for i in range(n):
m.append(l[i] + r[i])
m_.append(l[i] + r[i])
m.sort()
ma = m[-1] + ... | output | 1 | 82,584 | 9 | 165,169 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,585 | 9 | 165,170 |
Tags: constructive algorithms, implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
import sys, string
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil, atan, pi, log2
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.re... | output | 1 | 82,585 | 9 | 165,171 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,586 | 9 | 165,172 |
Tags: constructive algorithms, implementation
Correct Solution:
```
import itertools
def find(r_list, l_list): # O(N)
result_list = [-(r + l) for r, l in zip(r_list, l_list)]
min_value = - min(result_list)
return [result + min_value + 1 for result in result_list]
def validate(r_list, l_list, result_lis... | output | 1 | 82,586 | 9 | 165,173 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left to right and started eating candies.
While the... | instruction | 0 | 82,587 | 9 | 165,174 |
Tags: constructive algorithms, implementation
Correct Solution:
```
def lr(a):
l = [0] * len(a)
r = [0] * len(a)
for i in range(len(a)):
for j in range(i+1, len(a)):
if a[j] > a[i]:
r[i] += 1
if a[i] > a[j]:
l[j] += 1
return l, r
n = int(... | output | 1 | 82,587 | 9 | 165,175 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,588 | 9 | 165,176 |
Yes | output | 1 | 82,588 | 9 | 165,177 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,589 | 9 | 165,178 |
Yes | output | 1 | 82,589 | 9 | 165,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,590 | 9 | 165,180 |
Yes | output | 1 | 82,590 | 9 | 165,181 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,591 | 9 | 165,182 |
Yes | output | 1 | 82,591 | 9 | 165,183 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,592 | 9 | 165,184 |
No | output | 1 | 82,592 | 9 | 165,185 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,593 | 9 | 165,186 |
No | output | 1 | 82,593 | 9 | 165,187 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,594 | 9 | 165,188 |
No | output | 1 | 82,594 | 9 | 165,189 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n children numbered from 1 to n in a kindergarten. Kindergarten teacher gave a_i (1 ≤ a_i ≤ n) candies to the i-th child. Children were seated in a row in order from 1 to n from left t... | instruction | 0 | 82,595 | 9 | 165,190 |
No | output | 1 | 82,595 | 9 | 165,191 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,978 | 9 | 165,956 |
Tags: implementation, two pointers
Correct Solution:
```
# n = int(input())
n, q = map(int, input().split())
l = 1
r = n
for ct in range(q):
s = input().split()
k = int(s[-1])
op = s[2]
if op == "left":
r = min(r, k-1)
elif op == "right":
l = max(l, k+1)
if l > r:
print(-1)
el... | output | 1 | 82,978 | 9 | 165,957 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,979 | 9 | 165,958 |
Tags: implementation, two pointers
Correct Solution:
```
n, m = map(int, input().split())
left = 1
right = n
for _ in range(m):
s = input().split()
direction = s[2]
pos = int(s[4])
if (direction == 'right'):
left = max(left, pos + 1)
else:
right = min(right, pos - 1)
print(right - left + 1 if righ... | output | 1 | 82,979 | 9 | 165,959 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,980 | 9 | 165,960 |
Tags: implementation, two pointers
Correct Solution:
```
n, m = map(int, input().split())
a = [1] * (n + 1)
a[0] = 0
for i in range(m):
t, th, lor, o, num = [i for i in input().split()]
num = int(num)
if lor == 'right':
for j in range(1, num + 1):
a[j] = 0
else:
for j in rang... | output | 1 | 82,980 | 9 | 165,961 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,981 | 9 | 165,962 |
Tags: implementation, two pointers
Correct Solution:
```
# import os,io
# input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n,m = list(map(int,input().split()))
l,h = 1,n
for i in range(m):
s = input().split()
v = int(s[-1])
d = s[2]
if d == 'left':
h = min(h,v-1)
else:
l =... | output | 1 | 82,981 | 9 | 165,963 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,982 | 9 | 165,964 |
Tags: implementation, two pointers
Correct Solution:
```
n, m = map(int, input().split())
maxl = 0
maxr = 0
i = 0
j = n-1
v = [1 for i in range(n)]
# while(1):
for k in range(m):
s = input().split()
if s[2] == 'right':
r = int(s[-1])
# print(r, i)
# cont = 0
for p in range(i, r)... | output | 1 | 82,982 | 9 | 165,965 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,983 | 9 | 165,966 |
Tags: implementation, two pointers
Correct Solution:
```
from collections import Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = BytesIO()
self.writable = "x... | output | 1 | 82,983 | 9 | 165,967 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,984 | 9 | 165,968 |
Tags: implementation, two pointers
Correct Solution:
```
def main():
n, m = map(int, input().split())
lo, hi = 0, n + 1
for _ in range(m):
_, _, d, _, s = input().split()
x = int(s)
if d == "left":
if hi > x:
hi = x
elif lo < x:
lo = x
... | output | 1 | 82,984 | 9 | 165,969 |
Provide tags and a correct Python 3 solution for this coding contest problem.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The boxes stand in one row, they are numbered from 1... | instruction | 0 | 82,985 | 9 | 165,970 |
Tags: implementation, two pointers
Correct Solution:
```
v = [int(i) for i in input().split()]
n = v[0]
m = v[1]
r = 1
l = n
ans = True
for i in range(m):
hint = input().split()
vt = int(hint[-1])
if hint[2] == 'left':
if(vt-1 < l):
l = vt-1
else:
if(vt+1 > r... | output | 1 | 82,985 | 9 | 165,971 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,986 | 9 | 165,972 |
Yes | output | 1 | 82,986 | 9 | 165,973 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,987 | 9 | 165,974 |
Yes | output | 1 | 82,987 | 9 | 165,975 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,988 | 9 | 165,976 |
Yes | output | 1 | 82,988 | 9 | 165,977 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,989 | 9 | 165,978 |
Yes | output | 1 | 82,989 | 9 | 165,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,990 | 9 | 165,980 |
No | output | 1 | 82,990 | 9 | 165,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,991 | 9 | 165,982 |
No | output | 1 | 82,991 | 9 | 165,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,992 | 9 | 165,984 |
No | output | 1 | 82,992 | 9 | 165,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
<image>
One morning the Cereal Guy found out that all his cereal flakes were gone. He found a note instead of them. It turned out that his smart roommate hid the flakes in one of n boxes. The b... | instruction | 0 | 82,993 | 9 | 165,986 |
No | output | 1 | 82,993 | 9 | 165,987 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,557 | 9 | 167,114 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
def xmax(x, y):
if x[1] > y[1]:return x
return y
class SegTree:
def __init__(self, init_val, n, ide_ele, seg_func):
self.segfunc = seg_func;self.num = 2**(n-1).bit_length();self.ide_ele = ide_ele;self.seg... | output | 1 | 83,557 | 9 | 167,115 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,558 | 9 | 167,116 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
from collections import deque
import sys
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return lis... | output | 1 | 83,558 | 9 | 167,117 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,559 | 9 | 167,118 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase
import threading
from heapq import heapify,heappush,heappop
def main():
n,m=map(int,input().split())
arr=list(map(int,input().split()))
... | output | 1 | 83,559 | 9 | 167,119 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,560 | 9 | 167,120 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
import sys
def input():
return sys.stdin.readline().rstrip()
def input_split():
return [int(i) for i in input().split()]
prefs = []
n, m = input_split()
desired = [0 for i in range(n)]
eaters = [[] for i in range(n)]
w ... | output | 1 | 83,560 | 9 | 167,121 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,561 | 9 | 167,122 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
import math
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
w = [int(_) for _ in input().split()]
edges = []
g = [[] for _ in range(n)]
deg = [0] * n
for i in range(m):
u, v = map(int, input().split... | output | 1 | 83,561 | 9 | 167,123 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,562 | 9 | 167,124 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
import sys
from collections import deque
input = sys.stdin.buffer.readline
n, m = map(int, input().split())
ds = [0] + list(map(int, input().split()))
pp = [[] for _ in range(n+1)]
for p in range(1, m+1):
a, b = map(int,... | output | 1 | 83,562 | 9 | 167,125 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,563 | 9 | 167,126 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
import sys
from collections import deque
def input():
return sys.stdin.readline().rstrip()
def input_split():
return [int(i) for i in input().split()]
n,m = input_split()
w = input_split()
num = [0 for i in range(n)]
p =... | output | 1 | 83,563 | 9 | 167,127 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different types of food and m Lee's best friends. Lee ha... | instruction | 0 | 83,564 | 9 | 167,128 |
Tags: data structures, dfs and similar, greedy, implementation, sortings
Correct Solution:
```
import collections
import sys
inpy = [int(x) for x in sys.stdin.read().split()]
n, m = inpy[:2]
w = inpy[2: 2 + n]
memo = [set() for _ in range(n)]
p = [[] for _i in range(m + 1)]
for i in range(1, m + 1):
x, y = inpy[n ... | output | 1 | 83,564 | 9 | 167,129 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different... | instruction | 0 | 83,565 | 9 | 167,130 |
Yes | output | 1 | 83,565 | 9 | 167,131 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Lee bought some food for dinner time, but Lee's friends eat dinner in a deadly way. Lee is so scared, he doesn't want to die, at least not before seeing Online IOI 2020...
There are n different... | instruction | 0 | 83,566 | 9 | 167,132 |
Yes | output | 1 | 83,566 | 9 | 167,133 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.