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 |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,047 | 4 | 110,094 |
Tags: implementation, strings
Correct Solution:
```
def gt(a):
hr = a[:2]
mi = a[3:5]
t = a[6]
p = (int(hr)%12)*60+int(mi)
if t == "p":
return p + 100000
return p
n = int(input())
s = [input()[1:8] for i in range(n)]
cnt = 1
sc = 1
for i in range(1, n):
if s[i] == s[i-1]:
sc += 1
if sc == 11:
sc = 1
... | output | 1 | 55,047 | 4 | 110,095 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,048 | 4 | 110,096 |
Tags: implementation, strings
Correct Solution:
```
#------------------------template--------------------------#
import os
import sys
from math import *
from collections import *
# from fractions import *
# from heapq import*
from bisect import *
from io import BytesIO, IOBase
def vsInput():
sys.stdin = open('input... | output | 1 | 55,048 | 4 | 110,097 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,049 | 4 | 110,098 |
Tags: implementation, strings
Correct Solution:
```
a=[]
for i in range(int(input())):
b=input().split('.')[0][1:]
h=int(b[:2])
m=int(b[3:5])
c=h*60+m
if b[6]=='p':
c+=720
if h==12:
c-=720
a.append(c%1440)
d=1
e=0
for i in range(len(a)):
if i!=0 and a[i]!=a[i-1]:
... | output | 1 | 55,049 | 4 | 110,099 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,050 | 4 | 110,100 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
ans = 1
last = -1
po = 0
for i in range(n):
s = input()
h = int(s[1:3])
h %= 12
m = int(s[4:6])
if s[7] == 'p':
h += 12
t = h * 60 + m
if t == last and po == 10:
po = 1
ans += 1
elif t == last:
... | output | 1 | 55,050 | 4 | 110,101 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,051 | 4 | 110,102 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
ans = 0
prevHr = 26
prevMin = 26
cnt = 1
for _ in range(n):
s = input()[1:10]
hr = int(s[:2])
min = int(s[3:5])
pm = s[-3] == 'p'
if((hr != 12 and pm) or (hr == 12 and not pm)):
hr = (hr + 12) % 24
if(hr < prevHr or (hr == prevHr and min <... | output | 1 | 55,051 | 4 | 110,103 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10... | instruction | 0 | 55,052 | 4 | 110,104 |
Tags: implementation, strings
Correct Solution:
```
from sys import stdin
lines = int(stdin.readline())
days = 1
count = 0
h1 = 0
m1 = 0
for x in range(lines):
log = stdin.readline().strip()
hour = int(log[1:3])
if hour == 12:
hour = 0
if log[7] =='p':
hour += 12
minute = int(log[4:6])
#print(h... | output | 1 | 55,052 | 4 | 110,105 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,053 | 4 | 110,106 |
Yes | output | 1 | 55,053 | 4 | 110,107 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,054 | 4 | 110,108 |
Yes | output | 1 | 55,054 | 4 | 110,109 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,055 | 4 | 110,110 |
Yes | output | 1 | 55,055 | 4 | 110,111 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,056 | 4 | 110,112 |
Yes | output | 1 | 55,056 | 4 | 110,113 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,057 | 4 | 110,114 |
No | output | 1 | 55,057 | 4 | 110,115 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,058 | 4 | 110,116 |
No | output | 1 | 55,058 | 4 | 110,117 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,059 | 4 | 110,118 |
No | output | 1 | 55,059 | 4 | 110,119 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for ea... | instruction | 0 | 55,060 | 4 | 110,120 |
No | output | 1 | 55,060 | 4 | 110,121 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,293 | 4 | 110,586 |
Yes | output | 1 | 55,293 | 4 | 110,587 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,294 | 4 | 110,588 |
Yes | output | 1 | 55,294 | 4 | 110,589 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,295 | 4 | 110,590 |
No | output | 1 | 55,295 | 4 | 110,591 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,296 | 4 | 110,592 |
No | output | 1 | 55,296 | 4 | 110,593 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,297 | 4 | 110,594 |
No | output | 1 | 55,297 | 4 | 110,595 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ZS the Coder has recently found an interesting concept called the Birthday Paradox. It states that given a random set of 23 people, there is around 50% chance that some two of them share the sam... | instruction | 0 | 55,298 | 4 | 110,596 |
No | output | 1 | 55,298 | 4 | 110,597 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,486 | 4 | 110,972 |
"Correct Solution:
```
a,b,c,d=map(int,input().split())
cnt = 0
for i in range(a,b):
if c<=i<d:
cnt+=1
print(cnt)
``` | output | 1 | 55,486 | 4 | 110,973 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,487 | 4 | 110,974 |
"Correct Solution:
```
a,b,c,d=[int(x) for x in input().split()]
print(max(0,min(d,b)-max(a,c)))
``` | output | 1 | 55,487 | 4 | 110,975 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,488 | 4 | 110,976 |
"Correct Solution:
```
a, b, c, d = map(int, input().split())
ans = min(b, d) - max(a, c)
print(max(ans, 0))
``` | output | 1 | 55,488 | 4 | 110,977 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,489 | 4 | 110,978 |
"Correct Solution:
```
a,b,c,d=map(int,input().split())
s=min(b,d)-max(a,c)
print(s) if s>0 else print(0)
``` | output | 1 | 55,489 | 4 | 110,979 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,490 | 4 | 110,980 |
"Correct Solution:
```
a,b,c,d=map(int,input().split())
a = min(b,d)-max(a,c)
print(a if a>0 else 0)
``` | output | 1 | 55,490 | 4 | 110,981 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,491 | 4 | 110,982 |
"Correct Solution:
```
a, b, c, d = map(int, input().split())
ans = max(0, min(b, d) - max(a, c))
print(ans)
``` | output | 1 | 55,491 | 4 | 110,983 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,492 | 4 | 110,984 |
"Correct Solution:
```
A,B,C,D=map(int,input().split())
d=min(B,D)-max(A,C)
print(d if d>=0 else 0)
``` | output | 1 | 55,492 | 4 | 110,985 |
Provide a correct Python 3 solution for this coding contest problem.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up.
Bob started holding down hi... | instruction | 0 | 55,493 | 4 | 110,986 |
"Correct Solution:
```
A,B,C,D=map(int, input().split())
x=min(B,D)-max(A,C)
if x<0:
print(0)
else:
print(x)
``` | output | 1 | 55,493 | 4 | 110,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,494 | 4 | 110,988 |
Yes | output | 1 | 55,494 | 4 | 110,989 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,495 | 4 | 110,990 |
Yes | output | 1 | 55,495 | 4 | 110,991 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,496 | 4 | 110,992 |
Yes | output | 1 | 55,496 | 4 | 110,993 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,497 | 4 | 110,994 |
Yes | output | 1 | 55,497 | 4 | 110,995 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,498 | 4 | 110,996 |
No | output | 1 | 55,498 | 4 | 110,997 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,499 | 4 | 110,998 |
No | output | 1 | 55,499 | 4 | 110,999 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,500 | 4 | 111,000 |
No | output | 1 | 55,500 | 4 | 111,001 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob are controlling a robot. They each have one switch that controls the robot.
Alice started holding down her button A second after the start-up of the robot, and released her button ... | instruction | 0 | 55,501 | 4 | 111,002 |
No | output | 1 | 55,501 | 4 | 111,003 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,354 | 4 | 112,708 |
"Correct Solution:
```
def get_input():
data_list = input().split()
for i in range(len(data_list)):
data_list[i] = int(data_list[i])
return data_list
def make_dict(day_dict, data_list):
candidate_num =data_list[0] + 1
for i in range(1, candidate_num):
data = data_list[i]
if ... | output | 1 | 56,354 | 4 | 112,709 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,355 | 4 | 112,710 |
"Correct Solution:
```
while(1):
N,Q=tuple(map(int,input().split()))
if not(N or Q):
break
data=[]
temp=[]
for i in range(N):
temp=list(map(int,input().split()))
temp.pop(0)
data.append(temp)
sum=0
max=0
index=0
for i in range(100):
sum=0
... | output | 1 | 56,355 | 4 | 112,711 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,356 | 4 | 112,712 |
"Correct Solution:
```
from collections import Counter
while True:
N,Q = map(int,input().split())
if N == 0: break
ctr = Counter()
for i in range(N):
src = list(map(int,input().split()))
ctr.update(src[1:])
ans_n = 0
ans_d = -1
for d,n in sorted(ctr.items()):
if n > a... | output | 1 | 56,356 | 4 | 112,713 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,357 | 4 | 112,714 |
"Correct Solution:
```
while True:
n, q = map(int, input().split())
if n == 0:
break
data = [list(map(int, input().split())) for i in range(n)]
for li in data:
if li[0] > 0:
del(li[0])
q -= 1
day = 0
for d in range(1,100):
cnt = 0
for li in data:... | output | 1 | 56,357 | 4 | 112,715 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,358 | 4 | 112,716 |
"Correct Solution:
```
while True:
tmp = input().split(' ')
n = int(tmp[0])
q = int(tmp[1])
if n == 0 and q == 0:
break
a = []
d = [0]*100
for i in range(n):
a = input().split(' ')
for j in range(int(a[0])):
qq = int(a[ j+1 ])
d[qq] = d[qq] + ... | output | 1 | 56,358 | 4 | 112,717 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,359 | 4 | 112,718 |
"Correct Solution:
```
while True:
N,Q = map(int,input().split())
if N+Q==0:
break
date = [0 for i in range(1000)]
for i in range(N):
M = list(map(int,input().split()))
for i in M[1:]:
date[i]+=1
a = max(date)
if a>=N:
for i in range(1000):
if N==date[i]:
print(i)
... | output | 1 | 56,359 | 4 | 112,719 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,360 | 4 | 112,720 |
"Correct Solution:
```
while True:
n, q = map(int, input().split())
if n == 0: break
c_dates = []
for i in range(n):
data = input().split()
del data[0]
for j in range(len(data)):
data[j] = int(data[j])
c_dates = c_dates + data
c_dates.sort()
... | output | 1 | 56,360 | 4 | 112,721 |
Provide a correct Python 3 solution for this coding contest problem.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) programs that it is very difficult to arra... | instruction | 0 | 56,361 | 4 | 112,722 |
"Correct Solution:
```
import collections
while True:
N, Q = map(int, input().split())
if N == 0 and Q == 0:
break
D = []
for _ in range(N):
i = list(map(int, input().split()))
del i[0]
[D.append(ii) for ii in i]
if not len(D) == 0:
c = collections.Counter(D)... | output | 1 | 56,361 | 4 | 112,723 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,362 | 4 | 112,724 |
Yes | output | 1 | 56,362 | 4 | 112,725 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,363 | 4 | 112,726 |
Yes | output | 1 | 56,363 | 4 | 112,727 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,364 | 4 | 112,728 |
Yes | output | 1 | 56,364 | 4 | 112,729 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,365 | 4 | 112,730 |
Yes | output | 1 | 56,365 | 4 | 112,731 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,366 | 4 | 112,732 |
No | output | 1 | 56,366 | 4 | 112,733 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (poss... | instruction | 0 | 56,367 | 4 | 112,734 |
No | output | 1 | 56,367 | 4 | 112,735 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.