message stringlengths 2 65.1k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 0 108k | cluster float64 14 14 | __index_level_0__ int64 0 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,343 | 14 | 158,686 |
Yes | output | 1 | 79,343 | 14 | 158,687 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,344 | 14 | 158,688 |
Yes | output | 1 | 79,344 | 14 | 158,689 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,345 | 14 | 158,690 |
Yes | output | 1 | 79,345 | 14 | 158,691 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,346 | 14 | 158,692 |
No | output | 1 | 79,346 | 14 | 158,693 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,347 | 14 | 158,694 |
No | output | 1 | 79,347 | 14 | 158,695 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,348 | 14 | 158,696 |
No | output | 1 | 79,348 | 14 | 158,697 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n/2 people. Your task is to find the number of ways n people can make two r... | instruction | 0 | 79,349 | 14 | 158,698 |
No | output | 1 | 79,349 | 14 | 158,699 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A festival will be held in a town's main street. There are n sections in the main street. The sections are numbered 1 through n from left to right. The distance between each adjacent sections is 1.
In the festival m fireworks will be launch... | instruction | 0 | 79,466 | 14 | 158,932 |
Tags: data structures, dp, math
Correct Solution:
```
class SortedList(list):
def add(self, other):
left = -1
right = len(self)
while right - left > 1:
mid = (right + left) >> 1
if other < self[mid]:
right = mid
else:
left ... | output | 1 | 79,466 | 14 | 158,933 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A festival will be held in a town's main street. There are n sections in the main street. The sections are numbered 1 through n from left to right. The distance between each adjacent sections is 1.
In the festival m fireworks will be launch... | instruction | 0 | 79,467 | 14 | 158,934 |
Tags: data structures, dp, math
Correct Solution:
```
from collections import deque
def rollingmax(x, y, r, a):
k = 2 * r + 1
d = deque()
lx = len(x)
for i in range(lx + r):
if i < lx:
while d and d[-1][1] <= x[i]:
d.pop()
d.append((i, x[i]))
whil... | output | 1 | 79,467 | 14 | 158,935 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A festival will be held in a town's main street. There are n sections in the main street. The sections are numbered 1 through n from left to right. The distance between each adjacent sections is 1.
In the festival m fireworks will be launch... | instruction | 0 | 79,468 | 14 | 158,936 |
Tags: data structures, dp, math
Correct Solution:
```
from collections import deque
n,m,v=map(int,input().split())
x,t,b,bt,dp,mi,mi2,mi3,dpmin,dp2=[0]*300,[0]*300,0,0,[[0]*2for i in range(150001)],0,100000000000000,10000000000000,0,[0]*150001
d=deque()
for i in range(m):
x[i],b,t[i]=map(int,input().split())
bt... | output | 1 | 79,468 | 14 | 158,937 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,563 | 14 | 159,126 |
Tags: combinatorics, math
Correct Solution:
```
def main():
N = 505
C = []
for i in range(N):
C.append([])
for j in range(N):
C[i].append(0)
for i in range(N):
C[i][i] = 1
for i in range(N):
C[i][0] = 1
for i in range(2, N):
... | output | 1 | 79,563 | 14 | 159,127 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,564 | 14 | 159,128 |
Tags: combinatorics, math
Correct Solution:
```
from math import factorial
def C(n, k):
return factorial(n) // (factorial(n - k) * factorial(k));
def solve(x, n):
return C(x + n - 1, n - 1)
n = int(input())
print(solve(5, n) * solve(3, n))
``` | output | 1 | 79,564 | 14 | 159,129 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,565 | 14 | 159,130 |
Tags: combinatorics, math
Correct Solution:
```
n = int(input())
print (n * (n + 1) * (n + 2) * (n + 3) * (n + 4) // 120 * n * (n + 1) * (n + 2) // 6)
``` | output | 1 | 79,565 | 14 | 159,131 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,566 | 14 | 159,132 |
Tags: combinatorics, math
Correct Solution:
```
n = int(input())
ans = int((5+n-1)*(5+n-2)*(5+n-3)*(5+n-4)*(5+n-5)/5/4/3/2)*int((3+n-1)*(3+n-2)*(3+n-3)/3/2)
print(int(ans))
``` | output | 1 | 79,566 | 14 | 159,133 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,567 | 14 | 159,134 |
Tags: combinatorics, math
Correct Solution:
```
n = int(input())
from functools import lru_cache
@lru_cache(maxsize = None)
def fun(i , k , p):
if i == n:
if k == 0 and p == 0:
return 1
return 0
ans = 0
for x in range(6):
for y in range(4):
if x <... | output | 1 | 79,567 | 14 | 159,135 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,568 | 14 | 159,136 |
Tags: combinatorics, math
Correct Solution:
```
n=int(input())
print( (n*(n+1)*(n+2)*(n+3)*(n+4)//(2*3*4*5))*
(n*(n+1)*(n+2)//(2*3)) )
``` | output | 1 | 79,568 | 14 | 159,137 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,569 | 14 | 159,138 |
Tags: combinatorics, math
Correct Solution:
```
import math
fac = math.factorial
n = int(input())
def nCr(n,k):
return fac(n)//(fac(n-k)*fac(k))
t = nCr(5+n-1,5)*nCr(3+n-1,3)
print((t))
``` | output | 1 | 79,569 | 14 | 159,139 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Because of budget cuts one IT company established new non-financial reward system instead of bonuses.
Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fi... | instruction | 0 | 79,570 | 14 | 159,140 |
Tags: combinatorics, math
Correct Solution:
```
from math import factorial as f
n = int(input())
print(int((int(f(n + 4) / (f(n - 1) * f(5)))) * (int(f(n + 2) / (f(n - 1) * f(3))))))
``` | output | 1 | 79,570 | 14 | 159,141 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady words in a large company. There are n employees working in a system of a strict hierarchy. Namely, each employee, with an exception of the CEO, has exactly one immediate manager. The CEO ... | instruction | 0 | 79,642 | 14 | 159,284 |
No | output | 1 | 79,642 | 14 | 159,285 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo shoot model's rating increases by a and after eac... | instruction | 0 | 79,643 | 14 | 159,286 |
Tags: data structures, two pointers
Correct Solution:
```
from sys import stdin
from collections import deque
def main():
n, a, b, c, d, st, l = map(int, input().split())
q = deque()
po = q.popleft
pu = q.append
mq = deque()
mpop = mq.pop
mpo = mq.popleft
mpu = mq.append
sb = [0] * (... | output | 1 | 79,643 | 14 | 159,287 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo sh... | instruction | 0 | 79,644 | 14 | 159,288 |
No | output | 1 | 79,644 | 14 | 159,289 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo sh... | instruction | 0 | 79,645 | 14 | 159,290 |
No | output | 1 | 79,645 | 14 | 159,291 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo sh... | instruction | 0 | 79,646 | 14 | 159,292 |
No | output | 1 | 79,646 | 14 | 159,293 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo sh... | instruction | 0 | 79,647 | 14 | 159,294 |
No | output | 1 | 79,647 | 14 | 159,295 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,403 | 14 | 160,806 |
Tags: dp, probabilities
Correct Solution:
```
r, s, p = map(int, input().split())
dp = [[[0] * (p+1) for _ in range(s+1)] for _ in range(r+1)]
dp[r][s][p] = 1
def nCk(n, k):
if n <= k:
return 1
res = 1
for i in range(k):
res *= n-i
for i in range(k):
res //= (i+1)
return res
... | output | 1 | 80,403 | 14 | 160,807 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,404 | 14 | 160,808 |
Tags: dp, probabilities
Correct Solution:
```
def read_data():
r, s, p = map(int, input().split())
return r, s, p
def P(r, s, p):
global memo
if memo[r][s][p]:
return memo[r][s][p]
if r == 0:
return (0, 1, 0)
if s == 0:
return (0, 0, 1)
if p == 0:
return (1,... | output | 1 | 80,404 | 14 | 160,809 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,405 | 14 | 160,810 |
Tags: dp, probabilities
Correct Solution:
```
r, s, p = map(int, input().split())
memo = [[[-1] * 101 for _ in range(101)] for _ in range(101)]
def f(n):
return n * (n - 1) // 2
def dfs(r, s, p):
if memo[r][s][p] > -0.5:
return memo[r][s][p]
n = r + s + p
if r == 0:
memo[r][s][p] = 0.0
... | output | 1 | 80,405 | 14 | 160,811 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,406 | 14 | 160,812 |
Tags: dp, probabilities
Correct Solution:
```
dp = [[[-1]*105 for _ in range(105)] for __ in range(105)]
dp2 = [[[-1]*105 for _ in range(105)] for __ in range(105)]
dp3 = [[[-1]*105 for _ in range(105)] for __ in range(105)]
#r, p, s
def f(x, y, z):
if dp[x][y][z] != -1:
return (dp[x][y][z])
i... | output | 1 | 80,406 | 14 | 160,813 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,407 | 14 | 160,814 |
Tags: dp, probabilities
Correct Solution:
```
import sys
input = sys.stdin.readline
def I():return input().strip()
def II():return int(input().strip())
def LI():return [*map(int,input().strip().split())]
import string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from bisect imp... | output | 1 | 80,407 | 14 | 160,815 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,408 | 14 | 160,816 |
Tags: dp, probabilities
Correct Solution:
```
#540D
[r,s,p] = list(map(float,input().split()))
def prob(k,n,b,mem):
if k > 0 and n >= 0 and b == 0:
return [1.,0.,0.],mem
elif k == 0 and n > 0 and b >= 0:
return [0.,1.,0.],mem
elif k >= 0 and n == 0 and b > 0:
return [0.,0.,1.],mem
... | output | 1 | 80,408 | 14 | 160,817 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,409 | 14 | 160,818 |
Tags: dp, probabilities
Correct Solution:
```
r, s, p = [int(x) for x in input().split()]
dp = [[[0 for i in range(105)] for j in range(105)] for k in range(105)]
dp[r][s][p] = 1
for i in range(r, -1, -1):
for j in range(s, -1, -1):
for k in range(p,-1, -1):
dnr = i * j + j * k + i * k
... | output | 1 | 80,409 | 14 | 160,819 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then... | instruction | 0 | 80,410 | 14 | 160,820 |
Tags: dp, probabilities
Correct Solution:
```
A, B, C = map(lambda x: int(x)+1, input().split())
M = max(max(A, B), C)
p = [[[0] * (M) for i in range(M)] for j in range(M)]
for a in range(M):
for b in range(M):
for c in range(M):
val=0
if a == 0 or b == 0:
val=0
... | output | 1 | 80,410 | 14 | 160,821 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how... | instruction | 0 | 80,475 | 14 | 160,950 |
Tags: constructive algorithms, data structures, graphs, greedy, sortings
Correct Solution:
```
n, root = map(int, input().split())
a = list(map(int, input().split()))
def push(d, x, val):
if x not in d:
d[x] = 0
d[x]+=val
if d[x]==0:
del d[x]
d = {}
for x in a:
push(d, x, 1)
... | output | 1 | 80,475 | 14 | 160,951 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how... | instruction | 0 | 80,476 | 14 | 160,952 |
Tags: constructive algorithms, data structures, graphs, greedy, sortings
Correct Solution:
```
n,s = map(int,input().split())
A = list(map(int,input().split()))
if A[s-1] != 0:
per = 1
A[s-1] = 0
else:
per = 0
A.sort()
maxs = max(A)
ans = [0] * (maxs + 1)
answer = maxs + 1
o = -1
for j in range(n):
if A... | output | 1 | 80,476 | 14 | 160,953 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how... | instruction | 0 | 80,477 | 14 | 160,954 |
Tags: constructive algorithms, data structures, graphs, greedy, sortings
Correct Solution:
```
[n, s] = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
mistakes = 0
mistakes += (a[s-1] is not 0)
a[s - 1] = 0
numSuperiors = [0]*(2*100000+100)
for superiors in a:
numSuperiors[superiors] +... | output | 1 | 80,477 | 14 | 160,955 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how... | instruction | 0 | 80,478 | 14 | 160,956 |
Tags: constructive algorithms, data structures, graphs, greedy, sortings
Correct Solution:
```
""" This is a solution to the problem Subordinates on codeforces.com
There is a DAG with n nodes, pointing towards the root, without further constraints.
Given: for each node, a number signifying the count of (d... | output | 1 | 80,478 | 14 | 160,957 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how... | instruction | 0 | 80,479 | 14 | 160,958 |
Tags: constructive algorithms, data structures, graphs, greedy, sortings
Correct Solution:
```
f = lambda: map(int, input().split())
n, s = f()
c = [0] * n
t = list(f())
for i in t: c[i] += 1
k = t[s - 1]
c[k] -= 1
d = c[0]
c += [d]
d += k > 0
i, j = 1, n
while i < j:
if c[i]: i += 1
elif c[j]:
c[j] -= ... | output | 1 | 80,479 | 14 | 160,959 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There w... | instruction | 0 | 80,480 | 14 | 160,960 |
No | output | 1 | 80,480 | 14 | 160,961 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There w... | instruction | 0 | 80,481 | 14 | 160,962 |
No | output | 1 | 80,481 | 14 | 160,963 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There w... | instruction | 0 | 80,482 | 14 | 160,964 |
No | output | 1 | 80,482 | 14 | 160,965 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n workers in a company, each of them has a unique id from 1 to n. Exaclty one of them is a chief, his id is s. Each worker except the chief has exactly one immediate superior.
There w... | instruction | 0 | 80,483 | 14 | 160,966 |
No | output | 1 | 80,483 | 14 | 160,967 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,759 | 14 | 161,518 |
"Correct Solution:
```
from collections import defaultdict
while True:
n = int(input())
if n == 0:
break
score = {}
dic = defaultdict(list)
for _ in range(n):
line = input().split()
name = line[0]
score[name] = 0
for d in line[2:]:
dic[d].append(name)
for v in dic.values():
... | output | 1 | 80,759 | 14 | 161,519 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,760 | 14 | 161,520 |
"Correct Solution:
```
while True:
try:
n = int(input())
except:
break
if n == 0: break
char = []
name = []
times = []
scores = {i: n + 1 for i in range(30)}
for i in range(n):
char = input().split()
name.append(char[0])
times.append(list(map(... | output | 1 | 80,760 | 14 | 161,521 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,761 | 14 | 161,522 |
"Correct Solution:
```
# AOJ 1074: Popularity Estimation
# Python3 2018.7.10 bal4u
while True:
n = int(input())
if n == 0: break
f, tbl = [0]*31, []
for i in range(n):
a = input().split()
nm = a.pop(0)
m = int(a.pop(0))
d = list(map(int, a))
tbl.append([0, nm, d])
for i in d: f[i] += 1
for i in range(... | output | 1 | 80,761 | 14 | 161,523 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,762 | 14 | 161,524 |
"Correct Solution:
```
from collections import defaultdict
while 1:
N = int(input())
if N == 0:
break
D = defaultdict(list)
S = [None]*N
for i in range(N):
name, _, *ts = input().split()
S[i] = name
for t in map(int, ts):
D[t].append(i)
P = [0]*N
f... | output | 1 | 80,762 | 14 | 161,525 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,763 | 14 | 161,526 |
"Correct Solution:
```
from itertools import combinations as C
while True:
n = int(input())
if n == 0: break
d, dd, ddd = {}, {}, {}
names = []
for i in range(n):
nmd = input().split()
d[nmd[0]] = nmd[2:]
names.append(nmd[0])
for cc in list(C(d.items(), n-1)):
t, ... | output | 1 | 80,763 | 14 | 161,527 |
Provide a correct Python 3 solution for this coding contest problem.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sou... | instruction | 0 | 80,764 | 14 | 161,528 |
"Correct Solution:
```
while True:
player_nun = int(input())
if player_nun == 0:
break
#?????????????????????
whole_data = []
for i in range(0, player_nun):
dat = input().split()
p_data = []
p_data.append(dat[0])
for x in dat[1:]:
p_data.append(int(x))
whole_data.append(p_data)
#???????????????... | output | 1 | 80,764 | 14 | 161,529 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of c... | instruction | 0 | 80,765 | 14 | 161,530 |
No | output | 1 | 80,765 | 14 | 161,531 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of c... | instruction | 0 | 80,766 | 14 | 161,532 |
No | output | 1 | 80,766 | 14 | 161,533 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of c... | instruction | 0 | 80,767 | 14 | 161,534 |
No | output | 1 | 80,767 | 14 | 161,535 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.