message stringlengths 2 48.6k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 318 108k | cluster float64 8 8 | __index_level_0__ int64 636 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing bears to deliver goods. The city that he lives... | instruction | 0 | 52,638 | 8 | 105,276 |
Tags: binary search, flows, graphs
Correct Solution:
```
from collections import deque
class Dinic():
def __init__(self, listEdge, s, t):
self.s = s
self.t = t
self.graph = {}
self.maxCap = 1000000
# dict các node lân cận
# e[0]: from, e[1]: to, e[2]:... | output | 1 | 52,638 | 8 | 105,277 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing bears to deliver goods. The city that he lives... | instruction | 0 | 52,639 | 8 | 105,278 |
Tags: binary search, flows, graphs
Correct Solution:
```
from collections import defaultdict, deque
adj = defaultdict(lambda: defaultdict(lambda: 0))
def bfs(graph, inicio, destino, parent):
parent.clear()
queue = deque()
queue.append([inicio, float("Inf")])
parent[inicio] = -2
while (len(queue)):... | output | 1 | 52,639 | 8 | 105,279 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing bears to deliver goods. The city that he lives... | instruction | 0 | 52,640 | 8 | 105,280 |
Tags: binary search, flows, graphs
Correct Solution:
```
from collections import deque
class Dinic():
def __init__(self, listEdge, s, t):
self.s = s
self.t = t
self.graph = {}
self.maxCap = 1000000
# dict các node lân cận
# e[0]: from, e[1]: to, e[2]: ... | output | 1 | 52,640 | 8 | 105,281 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing bears to deliver goods. The city that he lives... | instruction | 0 | 52,641 | 8 | 105,282 |
Tags: binary search, flows, graphs
Correct Solution:
```
from collections import defaultdict, deque
def bfs(graph, inicio, destino, parent):
parent.clear()
queue = deque()
queue.append([inicio, float("Inf")])
parent[inicio] = -2
while (len(queue)):
current, flow = queue.popleft()
... | output | 1 | 52,641 | 8 | 105,283 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing bears to deliver goods. The city that he lives... | instruction | 0 | 52,642 | 8 | 105,284 |
Tags: binary search, flows, graphs
Correct Solution:
```
from collections import defaultdict, deque
def bfs(graph, inicio, destino, parent):
parent.clear()
queue = deque()
queue.append([inicio, float("Inf")])
parent[inicio] = -2
while (len(queue)):
current, flow = queue.popleft()
... | output | 1 | 52,642 | 8 | 105,285 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing... | instruction | 0 | 52,643 | 8 | 105,286 |
No | output | 1 | 52,643 | 8 | 105,287 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing... | instruction | 0 | 52,644 | 8 | 105,288 |
No | output | 1 | 52,644 | 8 | 105,289 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing... | instruction | 0 | 52,645 | 8 | 105,290 |
No | output | 1 | 52,645 | 8 | 105,291 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees so he decided to move to the city.
In the city, Niwel took on a job managing... | instruction | 0 | 52,646 | 8 | 105,292 |
No | output | 1 | 52,646 | 8 | 105,293 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,647 | 8 | 105,294 |
Tags: binary search, dp, greedy
Correct Solution:
```
B1 = 0
B2 = 0
def solve(rem , step , sub):
global B1 , B2
if rem == 0 :
if (step == B1): B2 = max(B2 , sub)
if (step > B1):
B1 = step
B2 = sub
return
cnt = 1
while((cnt+1)**3 <= rem): cnt+=1
solve(r... | output | 1 | 52,647 | 8 | 105,295 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,648 | 8 | 105,296 |
Tags: binary search, dp, greedy
Correct Solution:
```
def g(m, n, s):
if not m: return n, s
k = int(m ** (1 / 3))
x, y = k ** 3, (k - 1) ** 3
return max(g(m - x, n + 1, s + x), g(x - y - 1, n + 1, s + y))
print(*g(int(input()), 0, 0))
``` | output | 1 | 52,648 | 8 | 105,297 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,649 | 8 | 105,298 |
Tags: binary search, dp, greedy
Correct Solution:
```
def kil(n):
if n<8: return (n,n)
m=2
while m*m*m<=n: m+=1
m-=1
k1,v1=kil(n-m*m*m)
k2,v2=kil(m*m*m-1-(m-1)*(m-1)*(m-1))
return (k1+1,v1+m*m*m) if (k1,v1+m*m*m)>(k2,v2+(m-1)*(m-1)*(m-1)) else (k2+1,v2+(m-1)*(m-1)*(m-1))
n=int(input())
pr... | output | 1 | 52,649 | 8 | 105,299 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,650 | 8 | 105,300 |
Tags: binary search, dp, greedy
Correct Solution:
```
#!/usr/bin/env python3
import sys
# 1 8 27 64 125 216 343 512 729 1000
# 1-7: blocks of size 1
# 8-15: 1 block of size 2, blocks of size 1
# 16-23: 2 blocks of size 2, blocks of size 1
# 24-26: 3 blocks of size 2, blocks of size 1
# 27-34: 1 block of size 3, block... | output | 1 | 52,650 | 8 | 105,301 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,651 | 8 | 105,302 |
Tags: binary search, dp, greedy
Correct Solution:
```
def main():
def f(n):
if n < 8:
return [n, n]
a = int((n + .5) ** 0.3333333333333333)
r1 = f(n - a * a * a)
r1[1] += a * a * a
a -= 1
r2 = f(3 * a * (a + 1))
r2[1] += a * a * a
if r1 < r... | output | 1 | 52,651 | 8 | 105,303 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,652 | 8 | 105,304 |
Tags: binary search, dp, greedy
Correct Solution:
```
def kil(n):
if n<8: return (n,n)
m=int(n**(1/3))
k1,v1=kil(n-m*m*m)
k2,v2=kil(m*m*m-1-(m-1)*(m-1)*(m-1))
return (k1+1,v1+m*m*m) if (k1,v1+m*m*m)>(k2,v2+(m-1)*(m-1)*(m-1)) else (k2+1,v2+(m-1)*(m-1)*(m-1))
n=int(input())
print(*kil(n))
``` | output | 1 | 52,652 | 8 | 105,305 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,653 | 8 | 105,306 |
Tags: binary search, dp, greedy
Correct Solution:
```
n, c = 0, 0
def dfs(now, m, t):
global n, c
if now == 0:
if m > n:
n, c = m, t
return
i = 1
while i**3 <= now:
i += 1
i -= 1
dfs(now-i**3, m+1, t+i**3)
dfs(i**3-1-(i-1)**3, m+1, t+(i-1)**3)
m = int(input())
dfs(m, 0, 0)
print(n, c)
... | output | 1 | 52,653 | 8 | 105,307 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block with side a has volume a3. A tower consisting o... | instruction | 0 | 52,654 | 8 | 105,308 |
Tags: binary search, dp, greedy
Correct Solution:
```
im = int(input())
best_steps = 0
best_length = 0
def rec(m, steps, substracted):
global best_steps, best_length
if m == 0:
if steps > best_steps:
best_steps = steps
best_length = substracted
elif steps == best_steps... | output | 1 | 52,654 | 8 | 105,309 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,655 | 8 | 105,310 |
Yes | output | 1 | 52,655 | 8 | 105,311 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,656 | 8 | 105,312 |
Yes | output | 1 | 52,656 | 8 | 105,313 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,657 | 8 | 105,314 |
Yes | output | 1 | 52,657 | 8 | 105,315 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,658 | 8 | 105,316 |
Yes | output | 1 | 52,658 | 8 | 105,317 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,659 | 8 | 105,318 |
No | output | 1 | 52,659 | 8 | 105,319 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,660 | 8 | 105,320 |
No | output | 1 | 52,660 | 8 | 105,321 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,661 | 8 | 105,322 |
No | output | 1 | 52,661 | 8 | 105,323 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.
A block ... | instruction | 0 | 52,662 | 8 | 105,324 |
No | output | 1 | 52,662 | 8 | 105,325 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,663 | 8 | 105,326 |
Tags: binary search, strings, two pointers
Correct Solution:
```
n=int(input())
s=input()
c=set(s)
d={i:0 for i in c}
maks=999999
l=0
for i in range(n):
d[s[i]]+=1
if c!=set():
if s[i] in c:
c.remove(s[i])
if c==set():
while True:
d[s[l]]-=1
if d[s[l]]==0:... | output | 1 | 52,663 | 8 | 105,327 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,664 | 8 | 105,328 |
Tags: binary search, strings, two pointers
Correct Solution:
```
n = int(input())
temp = input()
st=[c for c in temp]
temp=set(st)
nT=len(temp)
s={}
for i in temp:
s[i]=0
currT=set()
i=0
j=0
minL=10**10
for i in range(len(st)):
currT.add(st[i])
s[st[i]]+=1
while j<i and (s[st[j]]>1):
s[st[j]]-=1
j+=1
if len(cu... | output | 1 | 52,664 | 8 | 105,329 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,665 | 8 | 105,330 |
Tags: binary search, strings, two pointers
Correct Solution:
```
from collections import *
c=Counter()
ans=n=int(input())
s=input()
k=len(set(s))
i=j=t=0
while j<n:
while len(c)<k and j<n: c[s[j]]+=1; j+=1
while len(c)==k:
if j-i<ans: ans=j-i
c[s[i]]-=1
if c[s[i]]==0: del c[s[i]]
... | output | 1 | 52,665 | 8 | 105,331 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,666 | 8 | 105,332 |
Tags: binary search, strings, two pointers
Correct Solution:
```
from collections import defaultdict
di = defaultdict(int)
n = int(input())
s = input()
cn = len(set(s))
co = 0
def ad(a):
global co,di
if(di[s[a]] == 0):
co += 1
di[s[a]] += 1
return
def re(a):
global co,di
di[s[a]] -= 1
... | output | 1 | 52,666 | 8 | 105,333 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,667 | 8 | 105,334 |
Tags: binary search, strings, two pointers
Correct Solution:
```
import os
import sys
from io import BytesIO, IOBase
import heapq as h
from types import GeneratorType
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
import os
self.os = os
self._fd = file.fil... | output | 1 | 52,667 | 8 | 105,335 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,668 | 8 | 105,336 |
Tags: binary search, strings, two pointers
Correct Solution:
```
def solve(s, k ):
d= {}
for i in s:
d[i]=1
c = len(d)
# print('c',c)
d= {}
for i in range(k):
if s[i] in d:
d[s[i]]+=1
else:
d[s[i]]=1
if (len(d)==c):
return True
# print('hello')
dif =0
for i in range(k,n) :
if s[i] in d:
... | output | 1 | 52,668 | 8 | 105,337 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,669 | 8 | 105,338 |
Tags: binary search, strings, two pointers
Correct Solution:
```
n = int(input())
s = input()
D = dict()
A = set()
for i in range(n):
if s[i] not in A:
A.add(s[i])
l = 100001
for i in A:
D[i] = 0
g = 0
c = '0'
for i in range(n):
D[s[i]] += 1
q = 0
if c == '0':
for k in A:
... | output | 1 | 52,669 | 8 | 105,339 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible to go out from each flat. Also, each flat is con... | instruction | 0 | 52,670 | 8 | 105,340 |
Tags: binary search, strings, two pointers
Correct Solution:
```
n,s=int(input()),input()
dis = len(set(s))
mp = {}
l,r,m,cnt=0,0,99999999,0
for c in s:
if c not in mp:
mp[c]=0
cnt+=1
mp[c]+=1
#print(cnt)
if cnt == dis:
while mp[s[l]]>1:
mp[s[l]]-=1
l+=1... | output | 1 | 52,670 | 8 | 105,341 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,671 | 8 | 105,342 |
Yes | output | 1 | 52,671 | 8 | 105,343 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,672 | 8 | 105,344 |
Yes | output | 1 | 52,672 | 8 | 105,345 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,673 | 8 | 105,346 |
Yes | output | 1 | 52,673 | 8 | 105,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,674 | 8 | 105,348 |
Yes | output | 1 | 52,674 | 8 | 105,349 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,675 | 8 | 105,350 |
No | output | 1 | 52,675 | 8 | 105,351 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,676 | 8 | 105,352 |
No | output | 1 | 52,676 | 8 | 105,353 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,677 | 8 | 105,354 |
No | output | 1 | 52,677 | 8 | 105,355 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter each flat from the street. It is possible t... | instruction | 0 | 52,678 | 8 | 105,356 |
No | output | 1 | 52,678 | 8 | 105,357 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.
Today you are late, so there are queues on some floors already. For each person you ... | instruction | 0 | 52,817 | 8 | 105,634 |
Tags: dp, graphs, shortest paths
Correct Solution:
```
# python3
import sys
from collections import namedtuple
def readline(): return map(int, input().split())
def readlines():
for line in sys.stdin.readlines():
yield map(int, line.split())
class State(namedtuple('State', 'payload time floor')):
d... | output | 1 | 52,817 | 8 | 105,635 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.
Today you are late, so there are queu... | instruction | 0 | 52,818 | 8 | 105,636 |
No | output | 1 | 52,818 | 8 | 105,637 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.
Today you are late, so there are queu... | instruction | 0 | 52,819 | 8 | 105,638 |
No | output | 1 | 52,819 | 8 | 105,639 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.
Today you are late, so there are queu... | instruction | 0 | 52,820 | 8 | 105,640 |
No | output | 1 | 52,820 | 8 | 105,641 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.
Today you are late, so there are queu... | instruction | 0 | 52,821 | 8 | 105,642 |
No | output | 1 | 52,821 | 8 | 105,643 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Bob is playing with 6-sided dice. A net of such standard cube is shown below.
<image>
He has an unlimited supply of these dice and wants to build a tower by stacking multiple dice on top of each other, while choosing the orientation of eac... | instruction | 0 | 53,171 | 8 | 106,342 |
Tags: constructive algorithms, math
Correct Solution:
```
n=int(input())
arr=[int(i) for i in input().split()]
for i in arr:
if i%14<=6 and i>14 and i%14>0:
print('YES')
else:
print('NO')
``` | output | 1 | 53,171 | 8 | 106,343 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Bob is playing with 6-sided dice. A net of such standard cube is shown below.
<image>
He has an unlimited supply of these dice and wants to build a tower by stacking multiple dice on top of each other, while choosing the orientation of eac... | instruction | 0 | 53,173 | 8 | 106,346 |
Tags: constructive algorithms, math
Correct Solution:
```
n = int(input())
for x in map(int, input().split()):
print("YES" if x > 14 and x % 14 > 0 and x % 14 <= 6 else "NO")
``` | output | 1 | 53,173 | 8 | 106,347 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Bob is playing with 6-sided dice. A net of such standard cube is shown below.
<image>
He has an unlimited supply of these dice and wants to build a tower by stacking multiple dice on top of each other, while choosing the orientation of eac... | instruction | 0 | 53,174 | 8 | 106,348 |
Tags: constructive algorithms, math
Correct Solution:
```
t = int(input())
x = list(map(int, input().split()))
for s in x:
if 1 <= s%14 <= 6 and s//14 >= 1:
print("YES")
else:
print("NO")
``` | output | 1 | 53,174 | 8 | 106,349 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Bob is playing with 6-sided dice. A net of such standard cube is shown below.
<image>
He has an unlimited supply of these dice and wants to build a tower by stacking multiple dice on top of each other, while choosing the orientation of eac... | instruction | 0 | 53,175 | 8 | 106,350 |
Tags: constructive algorithms, math
Correct Solution:
```
n = int(input())
l = []
l = map(int, input().split())
for i in l:
x = False
if i < 15:
x=False
else:
for n in range (1,7):
if ((i-n)%14==0):
x=True
if (x):
print("YES")
else:
... | output | 1 | 53,175 | 8 | 106,351 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.