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.
It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis. Each of the doctors needs the information about all previous visits, so Borya has to visit the... | instruction | 0 | 14,720 | 4 | 29,440 |
No | output | 1 | 14,720 | 4 | 29,441 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis. Each of the doctors needs the information about all previous visits, so Borya has to visit the... | instruction | 0 | 14,721 | 4 | 29,442 |
No | output | 1 | 14,721 | 4 | 29,443 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis. Each of the doctors needs the information about all previous visits, so Borya has to visit the... | instruction | 0 | 14,722 | 4 | 29,444 |
No | output | 1 | 14,722 | 4 | 29,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis. Each of the doctors needs the information about all previous visits, so Borya has to visit the... | instruction | 0 | 14,723 | 4 | 29,446 |
No | output | 1 | 14,723 | 4 | 29,447 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,634 | 4 | 31,268 |
Tags: implementation
Correct Solution:
```
n, t = [int(s) for s in input().split()]
a = [int(s) for s in input().split()]
ans = 0
while(t>0):
t -= 86400-a[ans]
ans += 1
print(ans)
``` | output | 1 | 15,634 | 4 | 31,269 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,635 | 4 | 31,270 |
Tags: implementation
Correct Solution:
```
n,t=map(int,input().split())
a=list(map(int,input().split()))
c=0
for i in range (n):
c+=(86400-a[i])
if c>=t:
print(i+1)
break
``` | output | 1 | 15,635 | 4 | 31,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,636 | 4 | 31,272 |
Tags: implementation
Correct Solution:
```
def main():
day = 86400
n,x = map(int,input().split())
a = list(map(int,input().split()))
if n < 1 or n > 100 or x < 1 or x > 1000000 or len(a) != n:
print("NO")
return
else:
ctr = 1
for d in a:
x -= max(day-d,0)
if x <= 0:
print(ctr)
return
ct... | output | 1 | 15,636 | 4 | 31,273 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,637 | 4 | 31,274 |
Tags: implementation
Correct Solution:
```
n,t=[int(i) for i in input().split()]
s=[int(i) for i in input().split()]
i=0
while t>0:
a=86400-s[i]
t=t-a
i=i+1
print(i)
``` | output | 1 | 15,637 | 4 | 31,275 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,638 | 4 | 31,276 |
Tags: implementation
Correct Solution:
```
n, t = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
ans = 1
sums = []
for i in a:
sums.append(86400 - i)
while sum(sums[0:ans]) < t:
ans += 1
print(ans)
``` | output | 1 | 15,638 | 4 | 31,277 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,639 | 4 | 31,278 |
Tags: implementation
Correct Solution:
```
R=lambda:list(map(int,input().split()))
n, t = R()
list = R()
for i in range(n):
t -= 86400 - list[i]
if (t <= 0):
print(i+1)
break
``` | output | 1 | 15,639 | 4 | 31,279 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,640 | 4 | 31,280 |
Tags: implementation
Correct Solution:
```
(n, t) = list(map(int, input().split()))
a = list(map(int, input().split()))
secondInDay = 24 * 60 * 60
result = 0
while t > 0:
t -= secondInDay - a[result]
result += 1
print(result)
``` | output | 1 | 15,640 | 4 | 31,281 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n next days. The number of seconds that Luba has t... | instruction | 0 | 15,641 | 4 | 31,282 |
Tags: implementation
Correct Solution:
```
(n, t) = map(lambda x: int(x) , str(input()).split(' '))
a = list(map(lambda x: int(x) , str(input()).split(' ')))
day = 0
while t > 0:
t -= 86400 - a[day]
day += 1
print(day)
``` | output | 1 | 15,641 | 4 | 31,283 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,642 | 4 | 31,284 |
Yes | output | 1 | 15,642 | 4 | 31,285 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,643 | 4 | 31,286 |
Yes | output | 1 | 15,643 | 4 | 31,287 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,644 | 4 | 31,288 |
Yes | output | 1 | 15,644 | 4 | 31,289 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,645 | 4 | 31,290 |
Yes | output | 1 | 15,645 | 4 | 31,291 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,646 | 4 | 31,292 |
No | output | 1 | 15,646 | 4 | 31,293 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,647 | 4 | 31,294 |
No | output | 1 | 15,647 | 4 | 31,295 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,648 | 4 | 31,296 |
No | output | 1 | 15,648 | 4 | 31,297 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.
But she has some work to do in each of n n... | instruction | 0 | 15,649 | 4 | 31,298 |
No | output | 1 | 15,649 | 4 | 31,299 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m subjects, besides, each subject is studied for no ... | instruction | 0 | 16,921 | 4 | 33,842 |
Tags: dp
Correct Solution:
```
class Subject:
def __init__(self, id, low, high, complexity):
self.id = id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for i in range(high - low + 1) ]
def add_link(self, link):
days = link.day... | output | 1 | 16,921 | 4 | 33,843 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m subjects, besides, each subject is studied for no ... | instruction | 0 | 16,922 | 4 | 33,844 |
Tags: dp
Correct Solution:
```
class Subject:
def __init__(self, id, low, high, complexity):
self.id = id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for i in range(high - low + 1) ]
def add_link(self, link):
days = link.day... | output | 1 | 16,922 | 4 | 33,845 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m subjects, besides, each subject is studied for no ... | instruction | 0 | 16,923 | 4 | 33,846 |
Tags: dp
Correct Solution:
```
class Subject:
def __init__(self, id, low, high, complexity):
self.id = id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for i in range(high - low + 1) ]
def add_link(self, link):
day = link.day
... | output | 1 | 16,923 | 4 | 33,847 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m subjects, besides, each subject is studied for no ... | instruction | 0 | 16,924 | 4 | 33,848 |
Tags: dp
Correct Solution:
```
class Subject:
def __init__(self, id, low, high, complexity):
self.id = id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for i in range(high - low + 1) ]
def add_link(self, link):
days = link.day... | output | 1 | 16,924 | 4 | 33,849 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m sub... | instruction | 0 | 16,925 | 4 | 33,850 |
No | output | 1 | 16,925 | 4 | 33,851 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yet another education system reform has been carried out in Berland recently. The innovations are as follows:
An academic year now consists of n days. Each day pupils study exactly one of m sub... | instruction | 0 | 16,926 | 4 | 33,852 |
No | output | 1 | 16,926 | 4 | 33,853 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an automatic door at the entrance of a factory. The door works in the following way:
* when one or several people come to the door and it is closed, the door immediately opens automa... | instruction | 0 | 17,372 | 4 | 34,744 |
No | output | 1 | 17,372 | 4 | 34,745 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an automatic door at the entrance of a factory. The door works in the following way:
* when one or several people come to the door and it is closed, the door immediately opens automa... | instruction | 0 | 17,374 | 4 | 34,748 |
No | output | 1 | 17,374 | 4 | 34,749 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is an automatic door at the entrance of a factory. The door works in the following way:
* when one or several people come to the door and it is closed, the door immediately opens automa... | instruction | 0 | 17,375 | 4 | 34,750 |
No | output | 1 | 17,375 | 4 | 34,751 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,620 | 4 | 35,240 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
"""
Time to Study
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0238
"""
import sys
def solve(t):
n = int(input())
for _ in range(n):
s, f = map(int, input().split())
t -= (f-s)
return 'OK' if t <= 0 else t
def main(args):
wh... | output | 1 | 17,620 | 4 | 35,241 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,621 | 4 | 35,242 |
"Correct Solution:
```
import sys,os
while 1:
t = int(input())
if t == 0: break
n = int(input())
sf = [list(map(int, input().split())) for _ in range(n)]
time = 0
for i in sf:
start,end = i
if start > end:
time += end - (start-24)
else:
time +... | output | 1 | 17,621 | 4 | 35,243 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,622 | 4 | 35,244 |
"Correct Solution:
```
# Aizu Problem 0238: Time to Study
import sys, math, os, bisect
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
while True:
T = int(input())
if T == 0:
break
n = int(input())
for _ in range(n):
star... | output | 1 | 17,622 | 4 | 35,245 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,623 | 4 | 35,246 |
"Correct Solution:
```
while True:
t = int(input())
if t == 0:
break
n = int(input())
ans = 0
for _ in range(n):
s, f = map(int, input().split())
ans += f - s
if ans >= t:
print('OK')
else:
print(t - ans)
``` | output | 1 | 17,623 | 4 | 35,247 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,624 | 4 | 35,248 |
"Correct Solution:
```
while 1:
t = int(input())
if t == 0:
break
n = int(input())
ans = 0
for _ in range(n):
s, f = map(int, input().split())
ans += f - s
if ans >= t:
print("OK")
else:
print(t - ans)
``` | output | 1 | 17,624 | 4 | 35,249 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,625 | 4 | 35,250 |
"Correct Solution:
```
#標準入力をし0だった場合はループを抜ける
while True:
num = int(input())
if num == 0:break
else:
num1 = int(input())
kei = 0
#勉強時間の合計を計算する
for _ in range(num1):
a,b = map(int,input().split())
kei += b - a
#勉強時間が足りてたら"OK... | output | 1 | 17,625 | 4 | 35,251 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,626 | 4 | 35,252 |
"Correct Solution:
```
while 1:
t = int(input())
if t == 0:break
n = int(input())
x = 0
for i in range(n):
x += (lambda lst:lst[-1] - lst[0])(list(map(int,input().split())))
print('OK' if t<=x else (t-x))
``` | output | 1 | 17,626 | 4 | 35,253 |
Provide a correct Python 3 solution for this coding contest problem.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and se... | instruction | 0 | 17,627 | 4 | 35,254 |
"Correct Solution:
```
while 1:
a=int(input())
if a == 0: break
b=int(input())
d=0
for _ in range(b):
c=list(map(int,input().split()))
d+=c[1]-c[0]
print(a-d if a>d else 'OK')
``` | output | 1 | 17,627 | 4 | 35,255 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,628 | 4 | 35,256 |
Yes | output | 1 | 17,628 | 4 | 35,257 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,629 | 4 | 35,258 |
Yes | output | 1 | 17,629 | 4 | 35,259 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,630 | 4 | 35,260 |
Yes | output | 1 | 17,630 | 4 | 35,261 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,631 | 4 | 35,262 |
Yes | output | 1 | 17,631 | 4 | 35,263 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,632 | 4 | 35,264 |
No | output | 1 | 17,632 | 4 | 35,265 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,633 | 4 | 35,266 |
No | output | 1 | 17,633 | 4 | 35,267 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shor... | instruction | 0 | 17,634 | 4 | 35,268 |
No | output | 1 | 17,634 | 4 | 35,269 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Gleb is a famous competitive programming teacher from Innopolis. He is planning a trip to N programming camps in the nearest future. Each camp will be held in a different country. For each of th... | instruction | 0 | 18,565 | 4 | 37,130 |
No | output | 1 | 18,565 | 4 | 37,131 |
Provide tags and a correct Python 3 solution for this coding contest problem.
School holidays come in Berland. The holidays are going to continue for n days. The students of school №N are having the time of their lives and the IT teacher Marina Sergeyevna, who has spent all the summer busy checking the BSE (Berland St... | instruction | 0 | 18,901 | 4 | 37,802 |
Tags: implementation
Correct Solution:
```
n,m = map(int,input().split())
Ln = [0]*n
while m!=0:
a,b = map(int,input().split())
for i in range(a,b+1):
Ln[i-1]+=1
m-=1
for i in range(0,len(Ln)):
if Ln[i]==0 :
print(i+1,0)
exit(0)
elif Ln[i]>1:
print(i+1,Ln[i])
... | output | 1 | 18,901 | 4 | 37,803 |
Provide tags and a correct Python 3 solution for this coding contest problem.
School holidays come in Berland. The holidays are going to continue for n days. The students of school №N are having the time of their lives and the IT teacher Marina Sergeyevna, who has spent all the summer busy checking the BSE (Berland St... | instruction | 0 | 18,902 | 4 | 37,804 |
Tags: implementation
Correct Solution:
```
def getquanto(v,m,cs):
q=0
day=v[cs+1][0]
for c in range(cs,m):
if v[c][0]<=day:
q+=1
return q
def corr(v,m,n):
if v[0][0]>1:
return 0,1,0
for c in range(m-1):
if v[c+1][0]-v[c][1]<=0:
return 0,v[... | output | 1 | 18,902 | 4 | 37,805 |
Provide tags and a correct Python 3 solution for this coding contest problem.
School holidays come in Berland. The holidays are going to continue for n days. The students of school №N are having the time of their lives and the IT teacher Marina Sergeyevna, who has spent all the summer busy checking the BSE (Berland St... | instruction | 0 | 18,903 | 4 | 37,806 |
Tags: implementation
Correct Solution:
```
n,m=map(int,input().split())
ar=[0 for _ in range(n)]
for _ in range(m):
a,b=map(int,input().split())
for j in range(a-1,b):
ar[j]+=1
for e in range(n):
if(ar[e]!=1):
print(e+1,ar[e])
break
else:
print("OK")
``` | output | 1 | 18,903 | 4 | 37,807 |
Provide tags and a correct Python 3 solution for this coding contest problem.
School holidays come in Berland. The holidays are going to continue for n days. The students of school №N are having the time of their lives and the IT teacher Marina Sergeyevna, who has spent all the summer busy checking the BSE (Berland St... | instruction | 0 | 18,904 | 4 | 37,808 |
Tags: implementation
Correct Solution:
```
# by hdev
def parsing(dual) :
a_b = dual.split()
a = int(a_b[0])
b = int(a_b[1])
return (a, b)
def creatTable(rows) :
table = []
index = 1
while index <= rows :
ai_bi = parsing(input())
table.append(ai_bi)
index += 1
ret... | output | 1 | 18,904 | 4 | 37,809 |
Provide tags and a correct Python 3 solution for this coding contest problem.
School holidays come in Berland. The holidays are going to continue for n days. The students of school №N are having the time of their lives and the IT teacher Marina Sergeyevna, who has spent all the summer busy checking the BSE (Berland St... | instruction | 0 | 18,905 | 4 | 37,810 |
Tags: implementation
Correct Solution:
```
a=[int(j) for j in input().split()]
n=a[0]
m=a[1]
count=0
b=[0 for i in range(m)]
for i in range(m):
b[i] = [int(j) for j in input().split()]
if b[0][0]!=1:
print(1,0)
else:
for i in range(m-1):
if b[i][1]==b[i+1][0]:
count=2
for k i... | output | 1 | 18,905 | 4 | 37,811 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.