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 |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that reads poker hand data and outputs the role for each. However, this issue follows the rules below.
* Poker is a competition with 5 playing cards.
* No more than 5 cards wit... | instruction | 0 | 38,492 | 19 | 76,984 |
No | output | 1 | 38,492 | 19 | 76,985 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,524 | 19 | 77,048 |
"Correct Solution:
```
T = int(input())
for i in range(T):
num = list(map(int, input().split()))
coler = input().split()
groups = [[], [], []]
for i, c in enumerate(coler):
if c == "R":
groups[0].append(num[i])
elif c == "G":
groups[1].append(num[i])
else:... | output | 1 | 38,524 | 19 | 77,049 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,525 | 19 | 77,050 |
"Correct Solution:
```
# your code goes here
#rummy
T=int(input())
for i in range(T):
n=[int(i) for i in input().split()]
c=[i for i in input().split()]
R=[[],[],[]]
for i in range(9):
if c[i]=="R":
R[0].append(n[i])
elif c[i]=="G":
R[1].append(n[i])
... | output | 1 | 38,525 | 19 | 77,051 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,526 | 19 | 77,052 |
"Correct Solution:
```
#!usr/bin/env python3
import sys
def main():
WINNING_HANDS = [
'111', '222', '333', '444', '555', '666', '777', '888', '999',
'123', '234', '345', '456', '567', '678', '789'
]
num_of_datasets = int(sys.stdin.readline().strip('\n'))
datas... | output | 1 | 38,526 | 19 | 77,053 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,527 | 19 | 77,054 |
"Correct Solution:
```
#!usr/bin/env python3
import sys
def main():
WINNING_HANDS = [
'111', '222', '333', '444', '555', '666', '777', '888', '999',
'123', '234', '345', '456', '567', '678', '789'
]
num_of_datasets = int(sys.stdin.readline().strip('\n'))
datas... | output | 1 | 38,527 | 19 | 77,055 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,528 | 19 | 77,056 |
"Correct Solution:
```
n = int(input())
def check(nl):
fl = list(nl)
for w in range(len(nl)):
if (fl[w] in nl):
i = fl[w]
if ((i+1 in nl) and (i+2 in nl)):
for k in range(i,i+3):
nl.remove(k)
elif(nl.count(i)%3 == 0):
... | output | 1 | 38,528 | 19 | 77,057 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,529 | 19 | 77,058 |
"Correct Solution:
```
R1 = [("R1","R2","R3"),("R2","R3","R4"),("R3","R4","R5"),("R4","R5","R6"),("R5","R6","R7"),("R6","R7","R8"),("R7","R8","R9")]
R2 = ["R1","R2","R3","R4","R5","R6","R7","R8","R9"]
G1 = [("G1","G2","G3"),("G2","G3","G4"),("G3","G4","G5"),("G4","G5","G6"),("G5","G6","G7"),("G6","G7","G8"),("G7","G8"... | output | 1 | 38,529 | 19 | 77,059 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,530 | 19 | 77,060 |
"Correct Solution:
```
def Check(A) :
Set = 0
if len(A) < 3 :
return False
else :
a = 0
while True :
if a >= len(A)-2 :
break
if A[a] == A[a+1] and A[a] == A[a+2] :
Set += 1
youso = A[a]
A.remove(... | output | 1 | 38,530 | 19 | 77,061 |
Provide a correct Python 3 solution for this coding contest problem.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in his or her hand, chooses one from his or her hand, discar... | instruction | 0 | 38,531 | 19 | 77,062 |
"Correct Solution:
```
for _ in range(int(input())):
n, c = map(int, input().split()), input().split()
c = list(zip(c, n))
c.sort(key = lambda x:x[1])
c.sort(key = lambda x:x[0])
while c != []:
if c[-1] == c[-2] == c[-3]:
c = c[:-3]
elif (c[-1][0], c[-1][1] -1) in c and (... | output | 1 | 38,531 | 19 | 77,063 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,532 | 19 | 77,064 |
Yes | output | 1 | 38,532 | 19 | 77,065 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,533 | 19 | 77,066 |
Yes | output | 1 | 38,533 | 19 | 77,067 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,534 | 19 | 77,068 |
Yes | output | 1 | 38,534 | 19 | 77,069 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,535 | 19 | 77,070 |
Yes | output | 1 | 38,535 | 19 | 77,071 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,536 | 19 | 77,072 |
No | output | 1 | 38,536 | 19 | 77,073 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,537 | 19 | 77,074 |
No | output | 1 | 38,537 | 19 | 77,075 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,538 | 19 | 77,076 |
No | output | 1 | 38,538 | 19 | 77,077 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Your friend recently came up with a card game called UT-Rummy.
The cards used in this game are numbered red, green, or blue and any number from 1 to 9. Each player in this game has 9 cards in h... | instruction | 0 | 38,539 | 19 | 77,078 |
No | output | 1 | 38,539 | 19 | 77,079 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,666 | 19 | 77,332 |
Tags: brute force, implementation
Correct Solution:
```
inp = input().strip().split()
arr = input().strip().split()
flag=0
for i in range(len(arr)):
if(inp[0][0]==arr[i][0] or inp[0][1]==arr[i][1]):
print("YES")
flag=1
break
if(flag==0):
print("NO")
``` | output | 1 | 38,666 | 19 | 77,333 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,667 | 19 | 77,334 |
Tags: brute force, implementation
Correct Solution:
```
import sys
input = sys.stdin.readline
def inp():
return(int(input()))
def inlt():
return(list(map(int, input().split())))
def insr():
s = input()
return(list(s[:len(s) - 1]))
def invr():
return(map(int, input().split()))
def foo():
... | output | 1 | 38,667 | 19 | 77,335 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,668 | 19 | 77,336 |
Tags: brute force, implementation
Correct Solution:
```
CardOnTaple = str(input())
CardOnHand = list(str(input()).split())
x=0
for e in CardOnHand:
if CardOnTaple[0] == e[0] :
x = x +1
elif CardOnTaple[1] == e[1] :
x = x + 1
if x >= 1 :
print("Yes")
else :
print("No")
``` | output | 1 | 38,668 | 19 | 77,337 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,669 | 19 | 77,338 |
Tags: brute force, implementation
Correct Solution:
```
x = input()
y = input().split()
a = 0
for i in y:
if x[0] in i or x[1] in i:
a = 1
if a == 1:
print("YES")
else:
print("NO")
``` | output | 1 | 38,669 | 19 | 77,339 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,670 | 19 | 77,340 |
Tags: brute force, implementation
Correct Solution:
```
s=input()
f=0
l = input().split(' ')
for i in l:
if s[0] in i[0]:
f=1
break
elif s[1] in i[1]:
f=1
break
if f == 1:
print('YES')
else:
print('NO')
``` | output | 1 | 38,670 | 19 | 77,341 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,671 | 19 | 77,342 |
Tags: brute force, implementation
Correct Solution:
```
played = list(input())
hand = [list(i) for i in input().split()]
possible = False
for card in hand:
if card[0] == played[0] or card[1] == played[1]:
possible = True
break
if possible:
print('YES')
else:
print('NO')
``` | output | 1 | 38,671 | 19 | 77,343 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,672 | 19 | 77,344 |
Tags: brute force, implementation
Correct Solution:
```
def cardGame():
tableCard = input()
cards = input().split()
for i in cards:
if tableCard[0] == i[0]:
return "YES"
elif tableCard[1] == i[1]:
return "YES"
return "NO"
print(cardGame())
``` | output | 1 | 38,672 | 19 | 77,345 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is called "Mau-Mau".
To play Mau-Mau, you need a p... | instruction | 0 | 38,673 | 19 | 77,346 |
Tags: brute force, implementation
Correct Solution:
```
board = input()
hand = input().split()
def solve():
global board, hand
for el in hand:
if el[0]== board[0]:
return 'yes'
if el[1]==board[1]:
return 'yes'
return 'no'
print(solve())
``` | output | 1 | 38,673 | 19 | 77,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,674 | 19 | 77,348 |
Yes | output | 1 | 38,674 | 19 | 77,349 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,675 | 19 | 77,350 |
Yes | output | 1 | 38,675 | 19 | 77,351 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,676 | 19 | 77,352 |
Yes | output | 1 | 38,676 | 19 | 77,353 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,677 | 19 | 77,354 |
Yes | output | 1 | 38,677 | 19 | 77,355 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,678 | 19 | 77,356 |
No | output | 1 | 38,678 | 19 | 77,357 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,679 | 19 | 77,358 |
No | output | 1 | 38,679 | 19 | 77,359 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,680 | 19 | 77,360 |
No | output | 1 | 38,680 | 19 | 77,361 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards with tourists staying in his hotel. His favorite game is c... | instruction | 0 | 38,681 | 19 | 77,362 |
No | output | 1 | 38,681 | 19 | 77,363 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
Play by arranging white and black stones on the table. First, place the stones on the left edge of the table. Then place the stones in the second place from the left. Repeat this n time... | instruction | 0 | 39,551 | 19 | 79,102 |
No | output | 1 | 39,551 | 19 | 79,103 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
Play by arranging white and black stones on the table. First, place the stones on the left edge of the table. Then place the stones in the second place from the left. Repeat this n time... | instruction | 0 | 39,552 | 19 | 79,104 |
No | output | 1 | 39,552 | 19 | 79,105 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
Play by arranging white and black stones on the table. First, place the stones on the left edge of the table. Then place the stones in the second place from the left. Repeat this n time... | instruction | 0 | 39,553 | 19 | 79,106 |
No | output | 1 | 39,553 | 19 | 79,107 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
problem
Play by arranging white and black stones on the table. First, place the stones on the left edge of the table. Then place the stones in the second place from the left. Repeat this n time... | instruction | 0 | 39,554 | 19 | 79,108 |
No | output | 1 | 39,554 | 19 | 79,109 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem.
Chouti was tired of studying, so he opened the computer and started playing a puzzle game.
Long long ago, the boy found a sequence s_1, s_2, …, s_n of length n,... | instruction | 0 | 40,445 | 19 | 80,890 |
No | output | 1 | 40,445 | 19 | 80,891 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem.
Chouti was tired of studying, so he opened the computer and started playing a puzzle game.
Long long ago, the boy found a sequence s_1, s_2, …, s_n of length n,... | instruction | 0 | 40,446 | 19 | 80,892 |
No | output | 1 | 40,446 | 19 | 80,893 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem.
Chouti was tired of studying, so he opened the computer and started playing a puzzle game.
Long long ago, the boy found a sequence s_1, s_2, …, s_n of length n,... | instruction | 0 | 40,447 | 19 | 80,894 |
No | output | 1 | 40,447 | 19 | 80,895 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is an interactive problem.
Chouti was tired of studying, so he opened the computer and started playing a puzzle game.
Long long ago, the boy found a sequence s_1, s_2, …, s_n of length n,... | instruction | 0 | 40,448 | 19 | 80,896 |
No | output | 1 | 40,448 | 19 | 80,897 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,763 | 19 | 81,526 |
Tags: implementation
Correct Solution:
```
wight = {"q" : 9 , "r":5 ,"b":3,"n":3 , "p":1}
p1 , p2 = [0,0]
for i in range(8):
for j in input():
if j.isupper():
p2 += wight.get(j.lower() , 0)
else :
p1 += wight.get(j , 0)
if p2 > p1:
print("White")
elif p1 > p2:
print("... | output | 1 | 40,763 | 19 | 81,527 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,764 | 19 | 81,528 |
Tags: implementation
Correct Solution:
```
T_ON = 0
DEBUG_ON = 1
MOD = 998244353
def solve():
G = {'q': 9, 'r': 5, 'b': 3, 'n': 3, 'p': 1}
white = 0
black = 0
for i in range(8):
for c in input():
w = G.get(c.lower(), 0)
if c.isupper():
white += w
... | output | 1 | 40,764 | 19 | 81,529 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,765 | 19 | 81,530 |
Tags: implementation
Correct Solution:
```
whiteWeight=blackWeight=0
whitePieces = {'Q':9, 'R':5, 'B':3, 'N':3, 'P':1}
blackPieces = {'q':9, 'r':5, 'b':3, 'n':3, 'p':1}
for i in range(8):
x = list(input())
for y in x:
if y in whitePieces:
whiteWeight += whitePieces[y]
elif y in black... | output | 1 | 40,765 | 19 | 81,531 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,766 | 19 | 81,532 |
Tags: implementation
Correct Solution:
```
b = 0
w = 0
for k in range(8):
inp = input()
for i in range(len(inp)):
if(inp[i]=='Q'):
w += 9
elif(inp[i]=='q'):
b += 9
elif(inp[i]=='R'):
w += 5
elif(inp[i]=='P'):
w += 1
elif(inp[i]=='B' or inp[i]=='N'):
w += 3
elif(inp[i]=='r'):
b += 5
eli... | output | 1 | 40,766 | 19 | 81,533 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,767 | 19 | 81,534 |
Tags: implementation
Correct Solution:
```
weights = {'Q': 9, 'R': 5, 'B': 3, 'N': 3, 'P': 1}
chess = ""
white = 0
black = 0
for i in range(8):
chess += input()
for key in weights.keys():
white += weights.get(key) * chess.count(key)
black += weights.get(key) * chess.count(key.lower())
if white > black:
... | output | 1 | 40,767 | 19 | 81,535 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,768 | 19 | 81,536 |
Tags: implementation
Correct Solution:
```
sumwhite = 0
sumblack = 0
for n in range(8):
line = input()
for ch in line:
if ch == '.':
continue
elif ch == 'Q':
sumwhite += 9
elif ch == 'R':
sumwhite += 5
elif ch == 'B':
sumwhite += 3
... | output | 1 | 40,768 | 19 | 81,537 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,769 | 19 | 81,538 |
Tags: implementation
Correct Solution:
```
desk = []
for test in range(8):
test = list(input())
desk += test
white = 0
black = 0
for j in desk:
if 'Q' in j:
white += 9
if 'R' in j:
white += 5
if 'B' in j:
white += 3
if 'N' in j:
white += 3
if 'P' in j:
... | output | 1 | 40,769 | 19 | 81,539 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is now stronger.
For each chess piece we know it... | instruction | 0 | 40,770 | 19 | 81,540 |
Tags: implementation
Correct Solution:
```
white = 0
black = 0
d = {'Q' : 9 , 'R' : 5, 'B' : 3, 'N' : 3, 'P' : 1, 'K' : 0}
for _ in range (8):
s = input()
for i in s:
if(i != '.'):
if(i==i.upper()): white += d[i]
else: black += d[i.upper()]
if(white > black): print('White')
eli... | output | 1 | 40,770 | 19 | 81,541 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A and B are preparing themselves for programming contests.
To train their logical thinking and solve problems better, A and B decided to play chess. During the game A wondered whose position is... | instruction | 0 | 40,771 | 19 | 81,542 |
Yes | output | 1 | 40,771 | 19 | 81,543 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.