message stringlengths 2 67k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 463 109k | cluster float64 19 19 | __index_level_0__ int64 926 217k |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,523 | 19 | 217,046 |
"Correct Solution:
```
cards = dict((x, list(input())) for x in 'abc')
turn = 'a'
while len(cards[turn]):
turn = cards[turn].pop(0)
print(turn.upper())
``` | output | 1 | 108,523 | 19 | 217,047 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,524 | 19 | 217,048 |
"Correct Solution:
```
s ={}
s["a"] = list(input())
s["b"] = list(input())
s["c"] = list(input())
turn = "a"
while True:
if len(s[turn]) == 0:
break
turn = s[turn].pop(0)
print(turn.upper())
``` | output | 1 | 108,524 | 19 | 217,049 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,525 | 19 | 217,050 |
"Correct Solution:
```
s={i:list(input()) for i in 'abc'}
tmp='a'
while s[tmp]:
tmp=s[tmp].pop(0)
print(tmp.upper())
# (#4130525)
``` | output | 1 | 108,525 | 19 | 217,051 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,526 | 19 | 217,052 |
"Correct Solution:
```
S = {"a": input(), "b": input(), "c": input()}
t = "a"
while S[t]:
nt = S[t][0]
S[t] = S[t][1:]
t = nt
else:
print(t.upper())
``` | output | 1 | 108,526 | 19 | 217,053 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,527 | 19 | 217,054 |
"Correct Solution:
```
a=[input(),input(),input()]
now=0
while a[now]:
y=a[now][0];a[now]=a[now][1:];now=ord(y)-ord('a')
print("ABC"[now])
``` | output | 1 | 108,527 | 19 | 217,055 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,528 | 19 | 217,056 |
"Correct Solution:
```
sa = list(input())
sb = list(input())
sc = list(input())
s = {'a':sa, 'b':sb, 'c':sc}
nxt = 'a'
while 1:
if len(s[nxt]) == 0:
break
nxt = s[nxt].pop(0)
print(chr(ord(nxt)-32))
``` | output | 1 | 108,528 | 19 | 217,057 |
Provide a correct Python 3 solution for this coding contest problem.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` written on it. The orders of the cards in the decks cannot ... | instruction | 0 | 108,529 | 19 | 217,058 |
"Correct Solution:
```
x = [input() for _ in range(3)]
l = [0] * 3
k = 0
while l[k] < len(x[k]):
n = ord(x[k][l[k]]) - ord('a')
l[k] += 1
k = n
print(['A', 'B', 'C'][k])
``` | output | 1 | 108,529 | 19 | 217,059 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,530 | 19 | 217,060 |
Yes | output | 1 | 108,530 | 19 | 217,061 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,531 | 19 | 217,062 |
Yes | output | 1 | 108,531 | 19 | 217,063 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,532 | 19 | 217,064 |
Yes | output | 1 | 108,532 | 19 | 217,065 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,533 | 19 | 217,066 |
Yes | output | 1 | 108,533 | 19 | 217,067 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,534 | 19 | 217,068 |
No | output | 1 | 108,534 | 19 | 217,069 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,535 | 19 | 217,070 |
No | output | 1 | 108,535 | 19 | 217,071 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,536 | 19 | 217,072 |
No | output | 1 | 108,536 | 19 | 217,073 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice, Bob and Charlie are playing Card Game for Three, as below:
* At first, each of the three players has a deck consisting of some number of cards. Each card has a letter `a`, `b` or `c` wri... | instruction | 0 | 108,537 | 19 | 217,074 |
No | output | 1 | 108,537 | 19 | 217,075 |
Provide a correct Python 3 solution for this coding contest problem.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] [4, 6] [5, 6] [6, 6]
Consider the standard set of 28... | instruction | 0 | 108,586 | 19 | 217,172 |
"Correct Solution:
```
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])
return self.parent[x]
d... | output | 1 | 108,586 | 19 | 217,173 |
Provide a correct Python 3 solution for this coding contest problem.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] [4, 6] [5, 6] [6, 6]
Consider the standard set of 28... | instruction | 0 | 108,587 | 19 | 217,174 |
"Correct Solution:
```
import sys
def subset(line):
l = line.strip().split(" ")
a = list(map(int, l))
xy = list(map(lambda x: [x // 10, x % 10], a))
dominos = [[2 if [x, y] in xy and x == y else \
1 if [x, y] in xy else \
1 if [y, x] in xy else 0 \
for x ... | output | 1 | 108,587 | 19 | 217,175 |
Provide a correct Python 3 solution for this coding contest problem.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] [4, 6] [5, 6] [6, 6]
Consider the standard set of 28... | instruction | 0 | 108,588 | 19 | 217,176 |
"Correct Solution:
```
# AOJ 1010: Dominoes Arrangement
# Python3 2018.7.5 bal4u
while True:
try: n = int(input())
except: break
f, g = [0]*7, [0]*7
p = list(input().split())
for x in p:
if x[0] == x[1]: g[int(x[0])] = 1
else:
f[int(x[0])] += 1
f[int(x[1])] += 1
if n == 1:
print("Yes")
continue
an... | output | 1 | 108,588 | 19 | 217,177 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] ... | instruction | 0 | 108,589 | 19 | 217,178 |
No | output | 1 | 108,589 | 19 | 217,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] ... | instruction | 0 | 108,590 | 19 | 217,180 |
No | output | 1 | 108,590 | 19 | 217,181 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] ... | instruction | 0 | 108,591 | 19 | 217,182 |
No | output | 1 | 108,591 | 19 | 217,183 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
[0, 0]
[0, 1] [1, 1]
[0, 2] [1, 2] [2, 2]
[0, 3] [1, 3] [2, 3] [3, 3]
[0, 4] [1, 4] [2, 4] [3, 4] [4, 4]
[0, 5] [1, 5] [2, 5] [3, 5] [4, 5] [5, 5]
[0, 6] [1, 6] [2, 6] [3, 6] ... | instruction | 0 | 108,592 | 19 | 217,184 |
No | output | 1 | 108,592 | 19 | 217,185 |
Provide a correct Python 3 solution for this coding contest problem.
Problem C: Earn Big
A group of N people is trying to challenge the following game to earn big money.
First, N participants are isolated from each other. From this point, they are not allowed to contact each other, or to leave any information for ot... | instruction | 0 | 108,597 | 19 | 217,194 |
"Correct Solution:
```
dp=[1]+[0]*1000
n,m=map(int,input().split())
for i in range(n):
j=1
while i+j<=n and j<=m:dp[i+j]+=dp[i]/(n-i);j+=1
print('%.10f'%dp[n])
``` | output | 1 | 108,597 | 19 | 217,195 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.