message stringlengths 2 39.6k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 450 109k | cluster float64 2 2 | __index_level_0__ int64 900 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Problem
Great Demon King Megumi wants to defeat the $ N $ hero who lives on the ground.
Megumi can cast explosion magic up to $ M $ times.
Explosion magic is magic that extinguishes heroes who ... | instruction | 0 | 47,903 | 2 | 95,806 |
No | output | 1 | 47,903 | 2 | 95,807 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,466 | 2 | 96,932 |
Tags: math, probabilities
Correct Solution:
```
def li():
return list(map(int, input().split(" ")))
for _ in range(int(input())):
a, b=li()
if b != 0 and a != 0:
s = (max(0, a-4*b) + a)/2
s*=min((a/4), b)
ans = 1/2 + s/(2*a*b)
print("{:.8f}".format(ans))
elif b == 0:
print(1)
else:
pri... | output | 1 | 48,466 | 2 | 96,933 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,467 | 2 | 96,934 |
Tags: math, probabilities
Correct Solution:
```
for i in range(int(input())):print("%.8f"%(lambda a,b:1 if a==0==b else (a/b/16+1/2)if b>a/4 else(1-b/a))(*list(map(int,input().split()))[0:2]))
``` | output | 1 | 48,467 | 2 | 96,935 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,468 | 2 | 96,936 |
Tags: math, probabilities
Correct Solution:
```
for i in range(int(input())):
a, b = map(int, input().split())
print(0.5 + a / (b << 4) if 4 * b > a else 1 - b / a if a else 1)
# Made By Mostafa_Khaled
``` | output | 1 | 48,468 | 2 | 96,937 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,469 | 2 | 96,938 |
Tags: math, probabilities
Correct Solution:
```
from fractions import Fraction
t = int(input())
for _ in range(t):
a, b = map(lambda x: Fraction(x), input().split(' '))
if b == 0:
print(1)
continue
elif a == 0:
print(0.5)
continue
up = a * (b + b + a / 4) / 2 - max(0, a ... | output | 1 | 48,469 | 2 | 96,939 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,470 | 2 | 96,940 |
Tags: math, probabilities
Correct Solution:
```
t = int(input())
for _ in range(t):
a, b = map(int, input().split())
if a == 0 and b == 0:
print(1)
elif a == 0:
print(0.5)
elif b == 0:
print(1)
elif a > 4 * b:
print('%.10f' % ((a - b) / a))
else:
print('%.10f' % (a / 16 / b + 0.5))
``` | output | 1 | 48,470 | 2 | 96,941 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,471 | 2 | 96,942 |
Tags: math, probabilities
Correct Solution:
```
def f(p, q):
if p == 0 and q == 0:
return 1
if p == 0:
return 0.5
if q == 0:
return 1
#p 0 -> a
#q -b -> b
if (q*4 <= p):
return 1-(q*2*q)/(2*p*q)
else:
return 1-(q - p/4 + q) * p /(4*p*q)
for i in range... | output | 1 | 48,471 | 2 | 96,943 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,472 | 2 | 96,944 |
Tags: math, probabilities
Correct Solution:
```
t = int( input() )
for i in range( t ):
a, b = list( map( int, input().split() ) )
if a == 0 and b == 0:
print( 1 )
elif a == 0:
print( 0.5 )
elif b == 0:
print( 1 )
else:
if a < 4*b:
ans = (b*a + a*a / 8) ... | output | 1 | 48,472 | 2 | 96,945 |
Provide tags and a correct Python 3 solution for this coding contest problem.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anvils come in different sizes and shapes. Quite o... | instruction | 0 | 48,473 | 2 | 96,946 |
Tags: math, probabilities
Correct Solution:
```
#Code by Sounak, IIESTS
#------------------------------warmup----------------------------
import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultd... | output | 1 | 48,473 | 2 | 96,947 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,474 | 2 | 96,948 |
Yes | output | 1 | 48,474 | 2 | 96,949 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,475 | 2 | 96,950 |
Yes | output | 1 | 48,475 | 2 | 96,951 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,476 | 2 | 96,952 |
Yes | output | 1 | 48,476 | 2 | 96,953 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,477 | 2 | 96,954 |
Yes | output | 1 | 48,477 | 2 | 96,955 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,478 | 2 | 96,956 |
No | output | 1 | 48,478 | 2 | 96,957 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,479 | 2 | 96,958 |
No | output | 1 | 48,479 | 2 | 96,959 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,480 | 2 | 96,960 |
No | output | 1 | 48,480 | 2 | 96,961 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
For some reason in many American cartoons anvils fall from time to time onto heroes' heads. Of course, safes, wardrobes, cruisers, planes fall sometimes too... But anvils do so most of all.
Anv... | instruction | 0 | 48,481 | 2 | 96,962 |
No | output | 1 | 48,481 | 2 | 96,963 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Berland is facing dark times again. The army of evil lord Van de Mart is going to conquer the whole kingdom. To the council of war called by the Berland's king Valery the Severe came n knights. ... | instruction | 0 | 49,976 | 2 | 99,952 |
No | output | 1 | 49,976 | 2 | 99,953 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Berland is facing dark times again. The army of evil lord Van de Mart is going to conquer the whole kingdom. To the council of war called by the Berland's king Valery the Severe came n knights. ... | instruction | 0 | 49,977 | 2 | 99,954 |
No | output | 1 | 49,977 | 2 | 99,955 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Berland is facing dark times again. The army of evil lord Van de Mart is going to conquer the whole kingdom. To the council of war called by the Berland's king Valery the Severe came n knights. ... | instruction | 0 | 49,978 | 2 | 99,956 |
No | output | 1 | 49,978 | 2 | 99,957 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Apart from plush toys, Imp is a huge fan of little yellow birds!
<image>
To summon birds, Imp needs strong magic. There are n trees in a row on an alley in a park, there is a nest on each of t... | instruction | 0 | 50,213 | 2 | 100,426 |
No | output | 1 | 50,213 | 2 | 100,427 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Apart from plush toys, Imp is a huge fan of little yellow birds!
<image>
To summon birds, Imp needs strong magic. There are n trees in a row on an alley in a park, there is a nest on each of t... | instruction | 0 | 50,214 | 2 | 100,428 |
No | output | 1 | 50,214 | 2 | 100,429 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Apart from plush toys, Imp is a huge fan of little yellow birds!
<image>
To summon birds, Imp needs strong magic. There are n trees in a row on an alley in a park, there is a nest on each of t... | instruction | 0 | 50,215 | 2 | 100,430 |
No | output | 1 | 50,215 | 2 | 100,431 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Apart from plush toys, Imp is a huge fan of little yellow birds!
<image>
To summon birds, Imp needs strong magic. There are n trees in a row on an alley in a park, there is a nest on each of t... | instruction | 0 | 50,216 | 2 | 100,432 |
No | output | 1 | 50,216 | 2 | 100,433 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,635 | 2 | 101,270 |
Tags: greedy, implementation, math
Correct Solution:
```
t=int(input())
for i in range(t):
h,n,m=map(int,input().split())
for j in range(n):
if h<=20:break
h=h//2+10
if h<=10*m:print("YES")
else:print("NO")
``` | output | 1 | 50,635 | 2 | 101,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,636 | 2 | 101,272 |
Tags: greedy, implementation, math
Correct Solution:
```
for i in range(int(input())):
x,n,m=map(int,input().split())
if(x>10):
while(n>0):
x=(x//2)+10
n-=1;
if(x/10)<=m:
print("YES")
else:
print("NO")
else:
if(m>0):
print("YES")
else:
print("NO")
``` | output | 1 | 50,636 | 2 | 101,273 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,637 | 2 | 101,274 |
Tags: greedy, implementation, math
Correct Solution:
```
num = int(input())
for x in range(num):
ss = input().split()
hit = int(ss[0])
void = int(ss[1])
strik = int(ss[2])
for x in range(void):
if( hit // 2 ) + 10 >= hit:
break
hit = (hit // 2) + 10
if hit > 10 * strik:
print('NO')
else... | output | 1 | 50,637 | 2 | 101,275 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,638 | 2 | 101,276 |
Tags: greedy, implementation, math
Correct Solution:
```
t=int(input())
import math
for _ in range(0,t):
x,n,m = input().split()
x=int(x)
n=int(n)
m=int(m)
z=999999999999
flag = 0
if(x-(m*10)<=0):
x=0
flag=1
while(x>=m*10 and n>0 and flag ==0):
if(x>z):
... | output | 1 | 50,638 | 2 | 101,277 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,639 | 2 | 101,278 |
Tags: greedy, implementation, math
Correct Solution:
```
t=int(input())
for _ in range(t):
x,n,m=map(int,input().split())
if(m*10>=x):
print("YES")
else:
for i in range(n):
x=(x//2)+10
for i in range(m):
x=x-10
if(x<=0):
print("YES")
... | output | 1 | 50,639 | 2 | 101,279 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,640 | 2 | 101,280 |
Tags: greedy, implementation, math
Correct Solution:
```
t=int(input())
for i in range(0,t):
x,n,m=map(int,input().split())
while x>20 and n>0:
x=x//2+10
n-=1
if x<=10*m:
print('YES')
else:
print('NO')
``` | output | 1 | 50,640 | 2 | 101,281 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,641 | 2 | 101,282 |
Tags: greedy, implementation, math
Correct Solution:
```
TC = int(input())
for _ in range(TC):
x, n, m = map(int, input().split())
if x <= 20:
if x > 10 * m:
print("NO")
else:
print("YES")
continue
while x > 20 and n > 0:
x = x // 2 + 10
n ... | output | 1 | 50,641 | 2 | 101,283 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest... | instruction | 0 | 50,642 | 2 | 101,284 |
Tags: greedy, implementation, math
Correct Solution:
```
t = int(input())
for _ in range(t):
a, b, c = map(int, input().split())
for i in range(b):
if a <= c * 10:
break
a = a // 2 + 10
a -= c * 10
if a <= 0:
print('YES')
else:
print('NO')
``` | output | 1 | 50,642 | 2 | 101,285 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,643 | 2 | 101,286 |
Yes | output | 1 | 50,643 | 2 | 101,287 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,644 | 2 | 101,288 |
Yes | output | 1 | 50,644 | 2 | 101,289 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,645 | 2 | 101,290 |
Yes | output | 1 | 50,645 | 2 | 101,291 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,646 | 2 | 101,292 |
Yes | output | 1 | 50,646 | 2 | 101,293 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,647 | 2 | 101,294 |
No | output | 1 | 50,647 | 2 | 101,295 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,648 | 2 | 101,296 |
No | output | 1 | 50,648 | 2 | 101,297 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,649 | 2 | 101,298 |
No | output | 1 | 50,649 | 2 | 101,299 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interes... | instruction | 0 | 50,650 | 2 | 101,300 |
No | output | 1 | 50,650 | 2 | 101,301 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,639 | 2 | 103,278 |
Tags: constructive algorithms, greedy
Correct Solution:
```
n = int(input())
inp = [input() for i in range(n)]
A = [[0 for j in range(n)] for i in range(n)]
for i in range(n):
for j in range(n):
if inp[i][j] == 'E':
A[i][j] = 1
k = 0
for i in A:
if sum(i) == n:
k += 1
c = 0
for j in ... | output | 1 | 51,639 | 2 | 103,279 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,640 | 2 | 103,280 |
Tags: constructive algorithms, greedy
Correct Solution:
```
n = int(input())
a = []
for i in range(n):
a.append(input())
if 'E' * n in a and ('E',) * n in zip(*a):
print(-1)
elif 'E' * n in a:
for j, s in enumerate(map(lambda x: ''.join(x), zip(*a))):
for i, c in enumerate(s):
i... | output | 1 | 51,640 | 2 | 103,281 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,641 | 2 | 103,282 |
Tags: constructive algorithms, greedy
Correct Solution:
```
class Solver(object):
def read_input(self):
n = int(input())
grid = []
for i in range(n):
l = list(input())
grid.append(l)
self.n = n
self.grid = grid
def solve_line(self):
pos... | output | 1 | 51,641 | 2 | 103,283 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,642 | 2 | 103,284 |
Tags: constructive algorithms, greedy
Correct Solution:
```
from sys import stdin
__author__ = 'artyom'
def solve(x):
a = []
for s in x:
dot_pos = s.find('.')
if dot_pos < 0:
return None
a.append(dot_pos + 1)
return a
def rotate(x, n):
y = []
for i in range(n):
y.append([])
for ... | output | 1 | 51,642 | 2 | 103,285 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,643 | 2 | 103,286 |
Tags: constructive algorithms, greedy
Correct Solution:
```
def main():
n = int(input())
l = [input() for _ in range(n)]
res = []
for y, s in enumerate(l):
for x, c in enumerate(s):
if c == '.':
res.append((x, y))
break
if len(res) < n:
res... | output | 1 | 51,643 | 2 | 103,287 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,644 | 2 | 103,288 |
Tags: constructive algorithms, greedy
Correct Solution:
```
import traceback
import math
from collections import defaultdict
from functools import lru_cache
def main():
N = int(input())
grid = []
for _ in range(N):
s = input()
grid.append(s)
if all('.' in [grid[i][j] for j in rang... | output | 1 | 51,644 | 2 | 103,289 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,645 | 2 | 103,290 |
Tags: constructive algorithms, greedy
Correct Solution:
```
n = int(input())
a = [input() for i in range(n)]
def checkRows():
for str in a:
if '.' not in str:
return False
return True
def solveRows():
i = 1
for str in a:
print(i, str.find('.') + 1)
i += 1
def check... | output | 1 | 51,645 | 2 | 103,291 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are numbered 1 through n from top to bottom, and the... | instruction | 0 | 51,646 | 2 | 103,292 |
Tags: constructive algorithms, greedy
Correct Solution:
```
n=int(input())
arr=[]
flag=True
for _ in range(n):
s=input()
if s=='E'*n:
flag=False
arr.append(s)
if flag:
for i in range(n):
for j in range(n):
if arr[i][j]=='.':
print(i+1,j+1)
brea... | output | 1 | 51,646 | 2 | 103,293 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are n... | instruction | 0 | 51,647 | 2 | 103,294 |
Yes | output | 1 | 51,647 | 2 | 103,295 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n Γ n grid. The rows are n... | instruction | 0 | 51,648 | 2 | 103,296 |
Yes | output | 1 | 51,648 | 2 | 103,297 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.