message stringlengths 2 28.7k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 21 109k | cluster float64 7 7 | __index_level_0__ int64 42 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,401 | 7 | 28,802 |
Tags: implementation
Correct Solution:
```
n , m = map(int , input().split())
l=[]
lhs = m
rhs=0
t=0
for i in range(n):
temp = str(input())
if t==1 or temp.count('.')!=len(temp):
t=1
l.append(temp)
if '*' in temp:
lhs = min(lhs , temp.index('*'))
rhs = max(rhs , t... | output | 1 | 14,401 | 7 | 28,803 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,402 | 7 | 28,804 |
Tags: implementation
Correct Solution:
```
import sys
def main():
inp = sys.stdin.read().strip().split('\n')
m, n = map(int, inp[0].split())
s = inp[1:]
x, y = set(), set()
for i in range(m):
for j in range(n):
if s[i][j] == '*':
x.add(i); y.add(j)
out = []
... | output | 1 | 14,402 | 7 | 28,805 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,403 | 7 | 28,806 |
Tags: implementation
Correct Solution:
```
s=input().split()
a=int(s[0])
b=int(s[1])
lis=[]
ans=[]
col=[]
for i in range(a):
k=input()
lis.append(k)
if(lis[i].find("*")!=-1):
col.append(i)
ans.append(lis[i].find("*"))
if(lis[i].rfind("*")!=-1):
ans.append(lis[i].rfind("*"))
ans.s... | output | 1 | 14,403 | 7 | 28,807 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,404 | 7 | 28,808 |
Tags: implementation
Correct Solution:
```
n,m=[int(s) for s in input().split()]
a=[]
up=-1
down=n
left=m
right=-1
for i in range(n):
s=input()
a.append(s)
if s.find('*')!=-1:
if up==-1: up=i
down=i
p=s.find('*')
if p<left:
left=p
p=s.rfind('*')
if... | output | 1 | 14,404 | 7 | 28,809 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,405 | 7 | 28,810 |
Tags: implementation
Correct Solution:
```
n, m = map(int, input().split())
A = [input() for _ in range(n)]
min_x, max_x = n, 0
min_y, max_y = m, 0
for i in range(n):
for j in range(m):
if A[i][j] == '*':
min_x, max_x = min(min_x, i), max(max_x, i)
min_y, max_y = min(min_y, j), max(... | output | 1 | 14,405 | 7 | 28,811 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,406 | 7 | 28,812 |
Tags: implementation
Correct Solution:
```
X = list(map(int, input().split()))
Picture, FirstRow, LastRow, First, Last = [], X[0], 0, X[1], 0
for i in range(X[0]):
Temp = input()
Picture.append(Temp)
if "*" in Temp:
FirstRow = min(FirstRow, i)
LastRow = i
First = min(First, Temp.inde... | output | 1 | 14,406 | 7 | 28,813 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,407 | 7 | 28,814 |
Tags: implementation
Correct Solution:
```
T_ON = 0
DEBUG_ON = 1
MOD = 998244353
def solve():
n, m = read_ints()
M = []
for r in range(n):
M.append(input())
r1 = n
r2 = 0
c1 = m
c2 = 0
for r in range(n):
for c in range(m):
if M[r][c] == '*':
... | output | 1 | 14,407 | 7 | 28,815 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decided to share it with his elder brother, who lives... | instruction | 0 | 14,408 | 7 | 28,816 |
Tags: implementation
Correct Solution:
```
n, m = map(int, input().split())
b = []
for i in range(n):
b.append(input())
x = []
for c in zip(*b):
for r in range(n):
if c[r] == '*':
x.append(r)
y = []
for r in b:
for c in range(m):
if r[c] == '*':
y.append(c)
for r... | output | 1 | 14,408 | 7 | 28,817 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A boy Bob likes to draw. Not long ago he bought a rectangular graph (checked) sheet with n rows and m columns. Bob shaded some of the squares on the sheet. Having seen his masterpiece, he decide... | instruction | 0 | 14,414 | 7 | 28,828 |
No | output | 1 | 14,414 | 7 | 28,829 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,486 | 7 | 28,972 |
Tags: combinatorics, number theory
Correct Solution:
```
from sys import stdin, stdout
def main():
n, p = 2000, 1000000007
factorial = [1] * (n + 1)
for i in range(2, n + 1):
factorial[i] = i * factorial[i - 1] % p
n, m = readline()
on = sorted(readline())
off = []
for i in range(1... | output | 1 | 14,486 | 7 | 28,973 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,487 | 7 | 28,974 |
Tags: combinatorics, number theory
Correct Solution:
```
import math
def myfunc(value):
if value == 0:
return 1
total = 1
for num in range(2, value+1):
total = total * num
return total
n, m = map(int, input().split())
mylist = sorted(list(map(int, input().split())))
value = myfunc... | output | 1 | 14,487 | 7 | 28,975 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,488 | 7 | 28,976 |
Tags: combinatorics, number theory
Correct Solution:
```
def f(p):
d = 1
for i in range(2, p + 1):
d *= i
return d
n, m = map(int, input().split())
l = list(map(int, input().split()))
if n == m:
print(1)
else:
l.sort()
for i in range(m):
l[i] -= 1
k = []
sm = n - m
i... | output | 1 | 14,488 | 7 | 28,977 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,489 | 7 | 28,978 |
Tags: combinatorics, number theory
Correct Solution:
```
#source: https://www.programmersought.com/article/2581544332/
import sys
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_list(): return list(map(int, sys.stdin.readline().strip().split()))
twodList = [[0 for _ in range(1005)] f... | output | 1 | 14,489 | 7 | 28,979 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,490 | 7 | 28,980 |
Tags: combinatorics, number theory
Correct Solution:
```
MOD = int(1e9+7)
n, m = map(int, input().split())
arr = sorted(list(map(int, input().split())))
fact = [1]
for i in range(1, 1000):
fact.append((fact[-1] * i) % MOD)
def fast_power(b, e):
res = 1
while e > 0:
if e % 2 == 1:
res =... | output | 1 | 14,490 | 7 | 28,981 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,491 | 7 | 28,982 |
Tags: combinatorics, number theory
Correct Solution:
```
def fac(n):
if n == 0:
return 1
mul = 1
for i in range(2,n+1):
mul *= i
return mul
n,m = (int(t) for t in input().split(' '))
gen = (int(t) for t in input().split(' '))
v = []
for i in gen:
v.append(i)
v.sort()
ans = fac(n-m)
... | output | 1 | 14,491 | 7 | 28,983 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,492 | 7 | 28,984 |
Tags: combinatorics, number theory
Correct Solution:
```
def bpow(a, b):
if b==0 or a==1:
return 1
if b%2 != 0:
return a * bpow(a, b-1) % mod
else:
c = bpow(a, b/2) % mod
return c * c % mod
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [0] + a + [n... | output | 1 | 14,492 | 7 | 28,985 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be swi... | instruction | 0 | 14,493 | 7 | 28,986 |
Tags: combinatorics, number theory
Correct Solution:
```
from sys import stdin, stdout
def main():
p = 1000000007 # Constante brindada por el problema
n, m = readline()
on = sorted(readline()) # Se ordena de menor a mayor los elementos del conjunto de luces encendidas
off = [] # Conjunto de cardina... | output | 1 | 14,493 | 7 | 28,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,494 | 7 | 28,988 |
Yes | output | 1 | 14,494 | 7 | 28,989 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,495 | 7 | 28,990 |
Yes | output | 1 | 14,495 | 7 | 28,991 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,496 | 7 | 28,992 |
Yes | output | 1 | 14,496 | 7 | 28,993 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,497 | 7 | 28,994 |
Yes | output | 1 | 14,497 | 7 | 28,995 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,498 | 7 | 28,996 |
No | output | 1 | 14,498 | 7 | 28,997 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,499 | 7 | 28,998 |
No | output | 1 | 14,499 | 7 | 28,999 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,500 | 7 | 29,000 |
No | output | 1 | 14,500 | 7 | 29,001 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he ... | instruction | 0 | 14,501 | 7 | 29,002 |
No | output | 1 | 14,501 | 7 | 29,003 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,544 | 7 | 29,088 |
Tags: greedy, implementation
Correct Solution:
```
n=int(input())
board=[""]*n
c=0
for i in range(n):
board[i]=list(input())
for i in range(1,n-1):
for j in range(1,n-1):
if(board[i][j]=='#' and board[i-1][j]=='#' and board[i+1][j]=='#' and board[i][j-1]=='#' and board[i][j+1]=='#'):
... | output | 1 | 14,544 | 7 | 29,089 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,545 | 7 | 29,090 |
Tags: greedy, implementation
Correct Solution:
```
def cross(i, j, v, n):
v[i*n+j] = '.'
if v[(i+1)*n+j] == '#':
v[(i+1)*n+j] = '.'
if v[(i+2)*n+j] == '#':
v[(i+2)*n+j] = '.'
if v[(i+1)*n+j+1] == '#':
v[(i+1)*n+j+1] = '.'
if v[(i+1)*n+j-1] == '#':
v[(i+1)*n+j-1] = '.'
return True
else:... | output | 1 | 14,545 | 7 | 29,091 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,546 | 7 | 29,092 |
Tags: greedy, implementation
Correct Solution:
```
def fits(x, y):
global n
return x >= 0 and x < n and y >= 0 and y < n
def paint(x, y):
global a
a[x][y] = '.'
a[x - 1][y] = '.'
a[x + 1][y] = '.'
a[x][y - 1] = '.'
a[x][y + 1] = '.'
def check(x, y):
global a
dx = [0, 0, -1, 1]
... | output | 1 | 14,546 | 7 | 29,093 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,547 | 7 | 29,094 |
Tags: greedy, implementation
Correct Solution:
```
n = int(input())
a = []
for i in range(n):
a.append(list(1 if c == '#' else 0 for c in input()))
for i in range(n):
for j in range(n):
if a[i][j]:
if i + 2 >= n or j + 1 >= n or j == 0:
print('NO')
exit()
if a[i + 1][j] + a[i + 2][j] + a[i + 1][j - 1]... | output | 1 | 14,547 | 7 | 29,095 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,548 | 7 | 29,096 |
Tags: greedy, implementation
Correct Solution:
```
n = int(input())
ar = [list(input()) for _ in range(n)]
for i in range(1, n-1):
for j in range(1, n-1):
if ar[i][j] == "#" and ar[i-1][j] == "#" and ar[i+1][j] == "#" and ar[i][j+1] == "#" and ar[i][j-1] == "#":
ar[i][j] = ar[i+1][j] = ar[i-1][j... | output | 1 | 14,548 | 7 | 29,097 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,549 | 7 | 29,098 |
Tags: greedy, implementation
Correct Solution:
```
n=int(input())
a=[[] for i in range(n)]
for i in range(n):
s=input().strip()
for j in s:
a[i]+=[j]
kr=0
for i in range(n):
for j in range(n):
#print(i,j)
if a[i][j]=='#':
kr+=1
if 0<i<n-1 and 0<j<n-1 and a[i][j]==... | output | 1 | 14,549 | 7 | 29,099 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,550 | 7 | 29,100 |
Tags: greedy, implementation
Correct Solution:
```
h = int(input())
l = [c == '#' for _ in range(h) for c in input()]
w = len(l) // h
cross = (0, w - 1, w, w + 1, 2 * w)
for i in range(1, (h - 2) * w - 1):
if all(l[_ + i] for _ in cross):
for _ in cross:
l[_ + i] = False
print(('YES', 'NO')[any(... | output | 1 | 14,550 | 7 | 29,101 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactly five cells of the board that looks like a cro... | instruction | 0 | 14,551 | 7 | 29,102 |
Tags: greedy, implementation
Correct Solution:
```
n = int(input())
matriz = []
yes = True
for i in range(n):
matriz.append(list(input()))
for i in range(1,n-1):
for j in range(1, n-1):
if(matriz[i][j] == '#' and matriz[i-1][j] == '#' and matriz[i+1][j] == '#' and matriz[i][j-1] == '#' and matriz[i][j... | output | 1 | 14,551 | 7 | 29,103 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,552 | 7 | 29,104 |
Yes | output | 1 | 14,552 | 7 | 29,105 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,553 | 7 | 29,106 |
Yes | output | 1 | 14,553 | 7 | 29,107 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,554 | 7 | 29,108 |
Yes | output | 1 | 14,554 | 7 | 29,109 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,555 | 7 | 29,110 |
Yes | output | 1 | 14,555 | 7 | 29,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,556 | 7 | 29,112 |
No | output | 1 | 14,556 | 7 | 29,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,557 | 7 | 29,114 |
No | output | 1 | 14,557 | 7 | 29,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,558 | 7 | 29,116 |
No | output | 1 | 14,558 | 7 | 29,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fox Ciel has a board with n rows and n columns. So, the board consists of n × n cells. Each cell contains either a symbol '.', or a symbol '#'.
A cross on the board is a connected set of exactl... | instruction | 0 | 14,559 | 7 | 29,118 |
No | output | 1 | 14,559 | 7 | 29,119 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,657 | 7 | 29,314 |
Tags: implementation, math
Correct Solution:
```
lst = input().split()
n = int(lst[0])
k = int(lst[1])
t = int(lst[2])
full = n*k
points = int(n*k*t/100)
result = []
while full > 0:
if points >= k:
result.append(str(k))
elif points > 0:
result.append(str(int(points)))
else:
result... | output | 1 | 14,657 | 7 | 29,315 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,658 | 7 | 29,316 |
Tags: implementation, math
Correct Solution:
```
from math import floor
(n, k, t) = list(map(int, input().split()))
t = floor(t * n * k / 100)
sat = t // k
part = t % k
s = (str(k) + " ") * sat
if (part > 0):
s += (str(part) + " ")
sat += 1
s += (str(0) + " ") * (n - sat)
print(s)
``` | output | 1 | 14,658 | 7 | 29,317 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,659 | 7 | 29,318 |
Tags: implementation, math
Correct Solution:
```
n, k, t = map(int, input().split())
p = int((t/100)*(n*k))
f = p//k
for x in range(f):
print(k, end=' ')
p -= f*k
if p > 0:
print(p, end=' ')
f+=1
for x in range(n-f):
print("0", end=' ')
``` | output | 1 | 14,659 | 7 | 29,319 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,660 | 7 | 29,320 |
Tags: implementation, math
Correct Solution:
```
import math
#n=int(input())
#lst = list(map(int, input().strip().split(' ')))
n,k,t = map(int, input().strip().split(' '))
x1=math.floor((t*n*k)/100)
c=0
f=0
for j in range(n):
c+=k
if f==1:
print(0,end=" ")
else:
if c<=x1:
print(k... | output | 1 | 14,660 | 7 | 29,321 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,661 | 7 | 29,322 |
Tags: implementation, math
Correct Solution:
```
#codeforces_71B
gi = lambda : list(map(int,input().split()))
n,k,t = gi()
t = (n*k*t)//100
while t > k:
print(k,end=" ")
t -= k
n -= 1
print(t,end=" ")
n -= 1
while n:
print(0,end=" ")
n -= 1
``` | output | 1 | 14,661 | 7 | 29,323 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,662 | 7 | 29,324 |
Tags: implementation, math
Correct Solution:
```
a = input().split(" ")
n = int(a[0])
k = int(a[1])
t = int(a[2]) / 100
loop = 1
output = ""
sumTotal = int(t * n * k)
while(loop <= n):
if(loop / n <= t):
output += str(k)
elif(((loop - 1) / n < t) and (loop / n > t)):
between = sumTotal - ((loop - 1) * k)
... | output | 1 | 14,662 | 7 | 29,325 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,663 | 7 | 29,326 |
Tags: implementation, math
Correct Solution:
```
x = input()
a,b,c=[int(i) for i in x.split(" ")]
proz = c/100
anz = a*b
volle = int(proz*anz/b)
rest = int(proz*anz/b%1*b)
res = ""
for i in range(volle):
res = res + str(b) + " "
if(a-volle != 0):
res = res + str(rest) + " "
for i in range(a-volle-1):
res... | output | 1 | 14,663 | 7 | 29,327 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A bar is represented as n squares, located in li... | instruction | 0 | 14,664 | 7 | 29,328 |
Tags: implementation, math
Correct Solution:
```
def readln(): return tuple(map(int, input().split()))
n, k, t = readln()
for i in range(n):
for p in range(0, k + 1):
if 100 * (i * k + p) <= n * k * t < 100 * (i * k + p + 1):
print(*([k] * i + [p] + [0]*(n - i - 1)))
import sys
... | output | 1 | 14,664 | 7 | 29,329 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A progress bar is an element of graphical interface that displays the progress of a process for this very moment before it is completed. Let's take a look at the following form of such a bar.
A... | instruction | 0 | 14,665 | 7 | 29,330 |
Yes | output | 1 | 14,665 | 7 | 29,331 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.