message stringlengths 2 20.2k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 757 108k | cluster float64 4 4 | __index_level_0__ int64 1.51k 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.
Note that you should find only the time after a minutes, see the examples to clarify the problem... | instruction | 0 | 10,384 | 4 | 20,768 |
No | output | 1 | 10,384 | 4 | 20,769 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.
Note that you should find only the time after a minutes, see the examples to clarify the problem... | instruction | 0 | 10,385 | 4 | 20,770 |
No | output | 1 | 10,385 | 4 | 20,771 |
Provide a correct Python 3 solution for this coding contest problem.
If you visit Aizu Akabeko shrine, you will find a unique paper fortune on which a number with more than one digit is written.
Each digit ranges from 1 to 9 (zero is avoided because it is considered a bad omen in this shrine). Using this string of nu... | instruction | 0 | 10,695 | 4 | 21,390 |
"Correct Solution:
```
n = input()
length = len(n)
ans = 10
#2桁,1桁混合
lst = []
ind = 0
while ind < length:
if n[ind] == "1" and ind + 1 <= length - 1:
lst.append(int(n[ind:ind + 2]))
ind += 2
else:
lst.append(int(n[ind]))
ind += 1
if len(lst) >= 2:
ans = min(ans, max(lst) - min(lst))
#n桁のみ
diviso... | output | 1 | 10,695 | 4 | 21,391 |
Provide a correct Python 3 solution for this coding contest problem.
If you visit Aizu Akabeko shrine, you will find a unique paper fortune on which a number with more than one digit is written.
Each digit ranges from 1 to 9 (zero is avoided because it is considered a bad omen in this shrine). Using this string of nu... | instruction | 0 | 10,696 | 4 | 21,392 |
"Correct Solution:
```
def sub(maxs, mins):
for i in range(len(maxs)):
if maxs[i] != mins[i]:
if i == len(maxs)-1:
return int(maxs[i]) - int(mins[i])
if i == len(maxs)-2:
return int(maxs[i:i+2]) - int(mins[i:i+2])
return 10
return 0
de... | output | 1 | 10,696 | 4 | 21,393 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you visit Aizu Akabeko shrine, you will find a unique paper fortune on which a number with more than one digit is written.
Each digit ranges from 1 to 9 (zero is avoided because it is consid... | instruction | 0 | 10,697 | 4 | 21,394 |
No | output | 1 | 10,697 | 4 | 21,395 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,892 | 4 | 23,784 |
Tags: implementation
Correct Solution:
```
d=int(input())
n=int(input())
a=list(map(int,input().split()))
b=d-a[-1]
max_day=d*n
summa=sum(a)
print(max_day-summa-b)
``` | output | 1 | 11,892 | 4 | 23,785 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,893 | 4 | 23,786 |
Tags: implementation
Correct Solution:
```
d = int(input())
n = int(input())
l = list(map(int,input().split()))
count = 0
sum = 0
for i in range(n-1):
if d>l[i]:
count+=d - l[i]
print(count)
``` | output | 1 | 11,893 | 4 | 23,787 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,894 | 4 | 23,788 |
Tags: implementation
Correct Solution:
```
a=int(input())
b=int(input())
ans=0
arr=list(map(int,input().split()))
for i in range(b-1):
ans+=abs(a-arr[i])
print(ans)
``` | output | 1 | 11,894 | 4 | 23,789 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,895 | 4 | 23,790 |
Tags: implementation
Correct Solution:
```
d = int(input())
n = int(input())
a = list(map(int, input().split()))
ans = sum([d - x for x in a[:-1]])
print(ans)
``` | output | 1 | 11,895 | 4 | 23,791 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,896 | 4 | 23,792 |
Tags: implementation
Correct Solution:
```
d=int(input())
n=int(input())
a=list(map(int, input().split()))
if max(a) > d:
print("-1")
else:
nb=0
for i in range(n-1):
nb += abs(d-a[i])
print(nb)
``` | output | 1 | 11,896 | 4 | 23,793 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,897 | 4 | 23,794 |
Tags: implementation
Correct Solution:
```
import math
d = int(input())
n = int(input())
a = [int(x) for x in input().split()]
sum = 0
i = 0
while i < n-1:
sum = sum + d-a[i]
i = i+1
print(sum)
``` | output | 1 | 11,897 | 4 | 23,795 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,898 | 4 | 23,796 |
Tags: implementation
Correct Solution:
```
d=int(input())
n=int(input())
nd=[int(x) for x in input().split()]
clock=1
i=0
c=0
while(i<n-1):
clock=nd[i]+1
if(clock>d):
clock=1
if(clock!=1):
c=c+(d+1-clock)
clock=1
i=i+1
print(c)
``` | output | 1 | 11,898 | 4 | 23,797 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face can display any number from 1 to d. It is guara... | instruction | 0 | 11,899 | 4 | 23,798 |
Tags: implementation
Correct Solution:
```
d = int(input())
n = int(input())
list1 = [int(x) for x in input().split()]
ans = 0
for i in range(n-1):
ans += d - list1[i]
print(ans)
``` | output | 1 | 11,899 | 4 | 23,799 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,900 | 4 | 23,800 |
Yes | output | 1 | 11,900 | 4 | 23,801 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,901 | 4 | 23,802 |
Yes | output | 1 | 11,901 | 4 | 23,803 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,902 | 4 | 23,804 |
Yes | output | 1 | 11,902 | 4 | 23,805 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,903 | 4 | 23,806 |
Yes | output | 1 | 11,903 | 4 | 23,807 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,904 | 4 | 23,808 |
No | output | 1 | 11,904 | 4 | 23,809 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,905 | 4 | 23,810 |
No | output | 1 | 11,905 | 4 | 23,811 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,906 | 4 | 23,812 |
No | output | 1 | 11,906 | 4 | 23,813 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya lives in a strange world. The year has n months and the i-th month has ai days. Vasya got a New Year present — the clock that shows not only the time, but also the date.
The clock's face ... | instruction | 0 | 11,907 | 4 | 23,814 |
No | output | 1 | 11,907 | 4 | 23,815 |
Provide tags and a correct Python 3 solution for this coding contest problem.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated the time he is going to need to read it. Let's... | instruction | 0 | 11,948 | 4 | 23,896 |
Tags: binary search, brute force, implementation, two pointers
Correct Solution:
```
def solve(n, t, a):
time = 0
res = 0
j = 0
for i in range(n):
if time + a[i] <= t:
time += a[i]
else:
time += a[i]
while time > t:
time -= a[j]
... | output | 1 | 11,948 | 4 | 23,897 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,952 | 4 | 23,904 |
Yes | output | 1 | 11,952 | 4 | 23,905 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,953 | 4 | 23,906 |
Yes | output | 1 | 11,953 | 4 | 23,907 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,954 | 4 | 23,908 |
Yes | output | 1 | 11,954 | 4 | 23,909 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,955 | 4 | 23,910 |
Yes | output | 1 | 11,955 | 4 | 23,911 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,956 | 4 | 23,912 |
No | output | 1 | 11,956 | 4 | 23,913 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,957 | 4 | 23,914 |
No | output | 1 | 11,957 | 4 | 23,915 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,958 | 4 | 23,916 |
No | output | 1 | 11,958 | 4 | 23,917 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valera took n books in the library and for each book he estimated... | instruction | 0 | 11,959 | 4 | 23,918 |
No | output | 1 | 11,959 | 4 | 23,919 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,981 | 4 | 23,962 |
Tags: implementation
Correct Solution:
```
k = int(input())
freq= [0] * 10
for _ in range(4):
for x in input():
if x != '.':
freq[int(x)] += 1
if max(freq) <= k * 2:
print('YES')
else:
print('NO')
``` | output | 1 | 11,981 | 4 | 23,963 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,982 | 4 | 23,964 |
Tags: implementation
Correct Solution:
```
# python 3
"""
Note that after applying the operations of the exchange, we can get any permutation of the elements of the array.
It is not difficult to understand that the answer would be "YES" if there were at least another different
number between the same-valued number, and... | output | 1 | 11,982 | 4 | 23,965 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,983 | 4 | 23,966 |
Tags: implementation
Correct Solution:
```
from collections import Counter
k = int(input())
s = ''
for i in range(4):
s += input()
s = Counter(s)
if '.' in s.keys():
s.pop('.')
while s:
if s.popitem()[1]>2*k:
print('NO')
break
else:
print('YES')
``` | output | 1 | 11,983 | 4 | 23,967 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,984 | 4 | 23,968 |
Tags: implementation
Correct Solution:
```
# import sys
# sys.stdin = open("test.in","r")
# sys.stdout = open("test.out.py","w")
n = int(input())
l = []
flag = 0
for i in range(4):
l1 = input()
l.append(l1)
for i in range(1,10):
count = 0
for j in l:
count = count + j.count(str(i))
if count > 2*n:
flag = 1
b... | output | 1 | 11,984 | 4 | 23,969 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,985 | 4 | 23,970 |
Tags: implementation
Correct Solution:
```
k = int(input())
ans = 'YES'
panels = ''
for i in range(4):
panels += str(input())
for i in range(1, 10, 1):
if panels.count(str(i)) > 2*k:
ans = 'NO'
break
print(ans)
exit(0)
``` | output | 1 | 11,985 | 4 | 23,971 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,986 | 4 | 23,972 |
Tags: implementation
Correct Solution:
```
k = int(input())
k *=2
m = ""
for _ in range(0,4):
m += input()
for i in range(1,10):
if(m.count(str(i)) > k):
print("NO")
exit(0)
print("YES")
``` | output | 1 | 11,986 | 4 | 23,973 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,987 | 4 | 23,974 |
Tags: implementation
Correct Solution:
```
import sys
k=int(input())
num=[]
for i in range(4):
n=input();
for j in n:
if j!='.':
num.append(j)
for i in set(num):
if num.count(i)>2*k:
print("NO")
sys.exit(0)
print("YES")
``` | output | 1 | 11,987 | 4 | 23,975 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to press (the preffered time when a player should p... | instruction | 0 | 11,988 | 4 | 23,976 |
Tags: implementation
Correct Solution:
```
c = [0] * 10
k = int(input()) * 2
for i in range(4):
for ch in input():
if ch.isdigit():
c[int(ch) - 1] += 1
for i in range(10):
if c[i] > k:
print('NO')
exit()
print('YES')
``` | output | 1 | 11,988 | 4 | 23,977 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,989 | 4 | 23,978 |
Yes | output | 1 | 11,989 | 4 | 23,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,990 | 4 | 23,980 |
Yes | output | 1 | 11,990 | 4 | 23,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,991 | 4 | 23,982 |
Yes | output | 1 | 11,991 | 4 | 23,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,992 | 4 | 23,984 |
Yes | output | 1 | 11,992 | 4 | 23,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,993 | 4 | 23,986 |
No | output | 1 | 11,993 | 4 | 23,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,994 | 4 | 23,988 |
No | output | 1 | 11,994 | 4 | 23,989 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,995 | 4 | 23,990 |
No | output | 1 | 11,995 | 4 | 23,991 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Cucumber boy is fan of Kyubeat, a famous music game.
Kyubeat has 16 panels for playing arranged in 4 × 4 table. When a panel lights up, he has to press that panel.
Each panel has a timing to p... | instruction | 0 | 11,996 | 4 | 23,992 |
No | output | 1 | 11,996 | 4 | 23,993 |
Provide a correct Python 3 solution for this coding contest problem.
You are a student of University of Aizu. And you work part-time at a restaurant.
Staffs of the restaurant are well trained to be delighted to provide more delicious products faster.
The speed providing products particularly depends on skill of the ... | instruction | 0 | 12,430 | 4 | 24,860 |
"Correct Solution:
```
while 1:
n=int(input())
if n==0:break
l=d=mi=cl=cm=cd=0
for i in range(n):
t,M=input().split()
M=int(M)
h,m=map(int,t.split(":"))
if m>M:M+=60
a=M-m<=8
if 11<=h<15:cl+=1;l+=a
elif 18<=h<21:cd+=1;d+=a
elif 21<=h or h< ... | output | 1 | 12,430 | 4 | 24,861 |
Provide a correct Python 3 solution for this coding contest problem.
You are a student of University of Aizu. And you work part-time at a restaurant.
Staffs of the restaurant are well trained to be delighted to provide more delicious products faster.
The speed providing products particularly depends on skill of the ... | instruction | 0 | 12,431 | 4 | 24,862 |
"Correct Solution:
```
# AOJ 1062: It's our delight!!
# Python3 2018.6.8 bal4u
# 昼11:00-14:59, 夕18:00-20:59, 深夜21:00-01:59
tt = [[660, 899], [1080, 1259], [1260, 1559]]
ss = ["lunch", "dinner", "midnight"]
while True:
n = int(input())
if n == 0: break
cnt, ok = [0]*3, [0]*3
for i in range(n):
hm, MM = input().s... | output | 1 | 12,431 | 4 | 24,863 |
Provide a correct Python 3 solution for this coding contest problem.
You are a student of University of Aizu. And you work part-time at a restaurant.
Staffs of the restaurant are well trained to be delighted to provide more delicious products faster.
The speed providing products particularly depends on skill of the ... | instruction | 0 | 12,432 | 4 | 24,864 |
"Correct Solution:
```
while 1:
N = int(input())
if N == 0:
break
a = b = c = 0
a0 = b0 = c0 = 0
for i in range(N):
s0, s1 = input().split()
h, m = map(int, s0.split(":"))
tm = 100*h + m
m1 = int(s1)
if m1 < m:
m1 += 60
if 1100 <= t... | output | 1 | 12,432 | 4 | 24,865 |
Provide a correct Python 3 solution for this coding contest problem.
You are a student of University of Aizu. And you work part-time at a restaurant.
Staffs of the restaurant are well trained to be delighted to provide more delicious products faster.
The speed providing products particularly depends on skill of the ... | instruction | 0 | 12,433 | 4 | 24,866 |
"Correct Solution:
```
import math
while True:
n = int(input())
if n == 0:
break
name = ("lunch", "dinner", "midnight")
dic = {}
clear = {}
for s in name:
dic[s] = 0
clear[s] = 0
for _ in range(n):
start, time = input().split()
flag = (int(time) - int(start[3:])) % 60 <= 8
if "11:0... | output | 1 | 12,433 | 4 | 24,867 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.