message stringlengths 2 22.8k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 16 109k | cluster float64 1 1 | __index_level_0__ int64 32 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible to get from one city to another only by bus. Bu... | instruction | 0 | 97,521 | 1 | 195,042 |
Tags: implementation, sortings
Correct Solution:
```
def main():
input()
a = map(int, input().split())
a = sorted(a)
d = [a[i + 1] - a[i] for i in range(len(a) - 1)]
m = int(2 * 1e9 + 1)
c = 0
for x in d:
if x < m:
m = x
c = 1
elif x == m:
... | output | 1 | 97,521 | 1 | 195,043 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,522 | 1 | 195,044 |
Yes | output | 1 | 97,522 | 1 | 195,045 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,523 | 1 | 195,046 |
Yes | output | 1 | 97,523 | 1 | 195,047 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,524 | 1 | 195,048 |
Yes | output | 1 | 97,524 | 1 | 195,049 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,525 | 1 | 195,050 |
Yes | output | 1 | 97,525 | 1 | 195,051 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,526 | 1 | 195,052 |
No | output | 1 | 97,526 | 1 | 195,053 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,527 | 1 | 195,054 |
No | output | 1 | 97,527 | 1 | 195,055 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,528 | 1 | 195,056 |
No | output | 1 | 97,528 | 1 | 195,057 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are pairwise distinct.
It is possible ... | instruction | 0 | 97,529 | 1 | 195,058 |
No | output | 1 | 97,529 | 1 | 195,059 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petr is a detective in Braginsk. Somebody stole a huge amount of money from a bank and Petr is to catch him. Somebody told Petr that some luxurious car moves along the roads without stopping.
P... | instruction | 0 | 97,587 | 1 | 195,174 |
No | output | 1 | 97,587 | 1 | 195,175 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petr is a detective in Braginsk. Somebody stole a huge amount of money from a bank and Petr is to catch him. Somebody told Petr that some luxurious car moves along the roads without stopping.
P... | instruction | 0 | 97,588 | 1 | 195,176 |
No | output | 1 | 97,588 | 1 | 195,177 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petr is a detective in Braginsk. Somebody stole a huge amount of money from a bank and Petr is to catch him. Somebody told Petr that some luxurious car moves along the roads without stopping.
P... | instruction | 0 | 97,589 | 1 | 195,178 |
No | output | 1 | 97,589 | 1 | 195,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petr is a detective in Braginsk. Somebody stole a huge amount of money from a bank and Petr is to catch him. Somebody told Petr that some luxurious car moves along the roads without stopping.
P... | instruction | 0 | 97,590 | 1 | 195,180 |
No | output | 1 | 97,590 | 1 | 195,181 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,776 | 1 | 195,552 |
"Correct Solution:
```
t=int(input())
#mapH[j][i]=(i,j)
for repeet in range(t):
actinidia_tate=[]
actinidia_yoko=[]
gx,gy=[int(i) for i in input().split(" ")]
mapH=[[0 for i in range(gx+1)] for j in range(gy+1)]
mapH[0][0]=1
p=int(input())
for i in range(p):
... | output | 1 | 97,776 | 1 | 195,553 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,777 | 1 | 195,554 |
"Correct Solution:
```
N=int(input())
for n in range(N):
gx,gy=map(int,input().split())
T=[[0 for i in range(gy+1)]for j in range(gx+1)]
left=[[0 for i in range(gy+1)]for j in range(gx+1)]
upper=[[0 for i in range(gy+1)]for j in range(gx+1)]
p=int(input())
for i in range(p):
x1,y1,x2,y... | output | 1 | 97,777 | 1 | 195,555 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,778 | 1 | 195,556 |
"Correct Solution:
```
for _ in range(int(input())):
X, Y = map(int,input().split())
m = int(input())
Judge = [[[0] * 2 for i in range(Y+1)] for j in range(X+1)]
# Judはある点(x, y)において左から通路があるか、また上から通路あるかを判定するための配列
# 形式は
# [x座標][y座標][0] = 0:点(x, y)において左からの通路あり
# [x座標][y座標][0] = 1:点(x, y)において左から... | output | 1 | 97,778 | 1 | 195,557 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,779 | 1 | 195,558 |
"Correct Solution:
```
n = int(input())
ans = []
for _ in range(n):
gx,gy = map(int,input().split())
m = [[0 for i_ in range(gy+1)] for j_ in range(gx+1)]
mat_num = int(input())
mat_h = [[0 for i_ in range(gy+1)] for j_ in range(gx+1)]
mat_v = [[0 for i_ in range(gy+1)] for j_ in range(gx+1)]
... | output | 1 | 97,779 | 1 | 195,559 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,780 | 1 | 195,560 |
"Correct Solution:
```
L = int(input().strip())
for _ in range(0,L):
gx,gy = map(int,input().strip().split(" "))
heiankyo = [[0 for j in range(0,gx+1)] for i in range(0,gy+1)]
heiankyo[0][0] = 1
P = int(input())
matatabi = []
for p in range(P):
x1,y1,x2,y2 = map(int,input().strip().split... | output | 1 | 97,780 | 1 | 195,561 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,781 | 1 | 195,562 |
"Correct Solution:
```
x=int(input())
for i in range(x):
gx,gy=map(int,input().split())
HK= [[0 for j in range(16)] for i in range(16)]
mttb=[[0 for j in range(16)] for i in range(16)]
for i in range(int(input())):
x1,y1,x2,y2=map(int,input().split())
if x1==x2:
mttb[x1]... | output | 1 | 97,781 | 1 | 195,563 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,782 | 1 | 195,564 |
"Correct Solution:
```
N=int(input())
for n in range(N):
gx,gy=map(int,input().split())
T=[[0 for i in range(gy+1)] for j in range(gx+1)]
left=[[0 for i in range(gy+1)] for j in range(gx+1)]
upper=[[0 for i in range(gy+1)] for j in range(gx+1)]
p=int(input())
for i in range(p):
x1,y1,x2,... | output | 1 | 97,782 | 1 | 195,565 |
Provide a correct Python 3 solution for this coding contest problem.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is ... | instruction | 0 | 97,783 | 1 | 195,566 |
"Correct Solution:
```
nn= int(input())
for _ in range(0,nn):
gx,gy = map(int,input().split())
p=int(input())
m_vert,m_horiz=[],[]
for _ in range(0,p):
a,b,c,d = map(int, input().split())
if a==c:
if b < d: # b > d nisuru
b,d = d,b
m_vert.append([... | output | 1 | 97,783 | 1 | 195,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,784 | 1 | 195,568 |
Yes | output | 1 | 97,784 | 1 | 195,569 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,785 | 1 | 195,570 |
Yes | output | 1 | 97,785 | 1 | 195,571 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,786 | 1 | 195,572 |
Yes | output | 1 | 97,786 | 1 | 195,573 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,787 | 1 | 195,574 |
Yes | output | 1 | 97,787 | 1 | 195,575 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,788 | 1 | 195,576 |
No | output | 1 | 97,788 | 1 | 195,577 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,789 | 1 | 195,578 |
No | output | 1 | 97,789 | 1 | 195,579 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,790 | 1 | 195,580 |
No | output | 1 | 97,790 | 1 | 195,581 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Heiankyo is known as a town with a grid of roads.
Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get t... | instruction | 0 | 97,791 | 1 | 195,582 |
No | output | 1 | 97,791 | 1 | 195,583 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,067 | 1 | 196,134 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
import os,io
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
cases = int(input())
for t in range(cases):
n,l = list(map(int,input().split()))
a = list(map(int, input().split()))
s1,s2 = 1,1
i,j = 0,n-1
cp1,... | output | 1 | 98,067 | 1 | 196,135 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,068 | 1 | 196,136 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input=sys.stdin.readline
def inp():
return int(input())
def st():
return input().rstrip('\n')
def lis():
r... | output | 1 | 98,068 | 1 | 196,137 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,069 | 1 | 196,138 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
for t in range(int(input())):
n,l=list(map(int,input().split()))
flag=list(map(int,input().split()))
a={}
prvt=0
prvs=1
prvd=0
a[0]=[0,1]#time,speed
for i in flag:
tmpd=i-prvd
tmpt=tmpd... | output | 1 | 98,069 | 1 | 196,139 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,070 | 1 | 196,140 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
import sys
import bisect
input = sys.stdin.readline
def main():
t = int(input())
for _ in range(t):
N, L = [int(x) for x in input().split()]
A = [0] + [int(x) for x in input().split()] + [L]
LA = [0] * ... | output | 1 | 98,070 | 1 | 196,141 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,071 | 1 | 196,142 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
for t in range(int(input())):
n,l=map(int,input().split())
a=list(map(int,input().split()))
d1, d2 = 0.0, float(l) # start and end points
s1, s2 = 1.0, 1.0 # initial speeds of both cars => 1m/s
p1, p2 = 0... | output | 1 | 98,071 | 1 | 196,143 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,072 | 1 | 196,144 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
from sys import stdin
tt = int(stdin.readline())
for loop in range(tt):
n,l = map(int,stdin.readline().split())
a = list(map(int,stdin.readline().split()))
a = [0] + a + [l]
L = [0]
now = 1
for i in range(1,n+2)... | output | 1 | 98,072 | 1 | 196,145 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,073 | 1 | 196,146 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
t = int(input())
def f(mid):
s=1
dis=0
for j in range(n):
if a[j]-dis<mid*s:
mid-=(a[j]-dis)/s
dis=a[j]
s=s+1
else:
break
return dis+s*mid
def f2(mid):
s=... | output | 1 | 98,073 | 1 | 196,147 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will st... | instruction | 0 | 98,074 | 1 | 196,148 |
Tags: binary search, dp, implementation, math, two pointers
Correct Solution:
```
t=int(input())
for _ in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
i=0
j=n-1
first=0
second=k
ans=0
speeda=1
speedb=1
preva=0
prevb=k
ans=0
while(i<=j):
... | output | 1 | 98,074 | 1 | 196,149 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,075 | 1 | 196,150 |
Yes | output | 1 | 98,075 | 1 | 196,151 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,076 | 1 | 196,152 |
Yes | output | 1 | 98,076 | 1 | 196,153 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,077 | 1 | 196,154 |
Yes | output | 1 | 98,077 | 1 | 196,155 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,078 | 1 | 196,156 |
Yes | output | 1 | 98,078 | 1 | 196,157 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,079 | 1 | 196,158 |
No | output | 1 | 98,079 | 1 | 196,159 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,080 | 1 | 196,160 |
No | output | 1 | 98,080 | 1 | 196,161 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,081 | 1 | 196,162 |
No | output | 1 | 98,081 | 1 | 196,163 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a road with length l meters. The start of the road has coordinate 0, the end of the road has coordinate l.
There are two cars, the first standing at the start of the road and the secon... | instruction | 0 | 98,082 | 1 | 196,164 |
No | output | 1 | 98,082 | 1 | 196,165 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A long time ago in some country in Asia were civil wars.
Each of n cities wanted to seize power. That's why sometimes one city gathered an army and sent it to campaign against another city.
Ro... | instruction | 0 | 98,346 | 1 | 196,692 |
No | output | 1 | 98,346 | 1 | 196,693 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A long time ago in some country in Asia were civil wars.
Each of n cities wanted to seize power. That's why sometimes one city gathered an army and sent it to campaign against another city.
Ro... | instruction | 0 | 98,347 | 1 | 196,694 |
No | output | 1 | 98,347 | 1 | 196,695 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A long time ago in some country in Asia were civil wars.
Each of n cities wanted to seize power. That's why sometimes one city gathered an army and sent it to campaign against another city.
Ro... | instruction | 0 | 98,348 | 1 | 196,696 |
No | output | 1 | 98,348 | 1 | 196,697 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A long time ago in some country in Asia were civil wars.
Each of n cities wanted to seize power. That's why sometimes one city gathered an army and sent it to campaign against another city.
Ro... | instruction | 0 | 98,349 | 1 | 196,698 |
No | output | 1 | 98,349 | 1 | 196,699 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Our brave travelers reached an island where pirates had buried treasure. However as the ship was about to moor, the captain found out that some rat ate a piece of the treasure map.
The treasure map can be represented as a rectangle n × m in... | instruction | 0 | 98,621 | 1 | 197,242 |
Tags: brute force, implementation
Correct Solution:
```
#!/usr/bin/env python3
from sys import stdin
n, m = map(int, stdin.readline().rstrip().split())
island = []
pos = {}
for i in range(n):
island.append(stdin.readline().rstrip())
for j, c in enumerate(island[i]):
if c >= 'A' and c <= 'Z':
... | output | 1 | 98,621 | 1 | 197,243 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.