s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time int64 0 100 | memory stringlengths 4 6 | code_size int64 15 14.7k | code stringlengths 15 14.7k | problem_id stringlengths 6 6 | problem_description stringlengths 358 9.83k | input stringlengths 2 4.87k | output stringclasses 807
values | __index_level_0__ int64 1.1k 1.22M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s128687751 | p00354 | u433250944 | 1561353534 | Python | Python3 | py | Accepted | 20 | 5592 | 298 | X= int(input())
if(X + 7) % 7 == 0:
print('thu')
elif(X + 8) % 7 == 0:
print('wed')
elif(X + 9) % 7 == 0:
print('tue')
elif(X + 10) % 7 == 0:
print('mon')
elif(X + 11) % 7 == 0:
print('sun')
elif(X + 12) % 7 == 0:
print('sat')
elif(X + 13) % 7 == 0:
print('fri')
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,834 |
s206911105 | p00354 | u818126736 | 1561353498 | Python | Python3 | py | Accepted | 20 | 5588 | 85 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,835 |
s430983976 | p00354 | u681232780 | 1561352877 | Python | Python3 | py | Accepted | 20 | 5592 | 216 | X = int(input())
if X%7 == 2 :
print('sat')
if X%7 == 3:
print('sun')
if X%7 == 4:
print('mon')
if X%7 == 5:
print('tue')
if X%7 == 6 :
print('wed')
if X%7 == 0:
print('thu')
if X%7 == 1:
print('fri')
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,836 |
s890136291 | p00354 | u821561321 | 1561352646 | Python | Python3 | py | Accepted | 20 | 5592 | 248 | X = int(input())
if X % 7 == 0:
print("thu")
elif X % 7 ==1:
print("fri")
elif X % 7 ==2:
print("sat")
elif X % 7 ==3:
print("sun")
elif X % 7 ==4:
print("mon")
elif X % 7 ==5:
print("tue")
elif X % 7 ==6:
print("wed")
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,837 |
s057828497 | p00354 | u064125291 | 1561352512 | Python | Python3 | py | Accepted | 20 | 5588 | 85 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,838 |
s807970619 | p00354 | u678843586 | 1561352448 | Python | Python3 | py | Accepted | 20 | 5588 | 85 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,839 |
s831813255 | p00354 | u313600138 | 1561352301 | Python | Python3 | py | Accepted | 20 | 5592 | 224 | x = int(input())
if (x%7 ==1):
print("fri")
elif (x%7 ==2):
print("sat")
elif (x%7 ==3):
print("sun")
elif (x%7 ==4):
print("mon")
elif (x%7 ==5):
print("tue")
elif (x%7 ==6):
print("wed")
else:
print("thu")
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,840 |
s968476448 | p00354 | u239237743 | 1561352256 | Python | Python3 | py | Accepted | 30 | 5608 | 602 | X = int(input())
s = [0,1,2,3]
if (X == 9-7-1):
print('fri')
elif (X == 9-7):
print('sat')
elif (X == 9-7+1):
print('sun')
elif (X == 9-7+2):
print('mon')
elif (X == 9-7+3):
print('tue')
elif (X == 9-7+4):
print('wed')
elif (X == 9-7+5):
print('thu')
elif (X == 9-7+6):
print('fri')
for i in s:
if(X... | p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,841 |
s198498508 | p00354 | u586792237 | 1561352141 | Python | Python3 | py | Accepted | 20 | 5592 | 225 | d = int(input())
y = d % 7
if y == 0:
print ('thu')
elif y == 1:
print('fri')
elif y == 2:
print('sat')
elif y == 3:
print('sun')
elif y == 4:
print('mon')
elif y == 5:
print('tue')
elif y == 6:
print('wed')
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,842 |
s325005817 | p00354 | u591403647 | 1561352098 | Python | Python3 | py | Accepted | 20 | 5592 | 209 | X=int(input())
if(X%7==2):
print("sat")
elif(X%7==3):
print("sun")
elif(X%7==4):
print("mon")
elif(X%7==5):
print("tue")
elif(X%7==6):
print("wed")
elif(X%7==0):
print("thu")
else:
print("fri")
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,843 |
s431136254 | p00354 | u351754662 | 1561351967 | Python | Python3 | py | Accepted | 20 | 5588 | 85 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,844 |
s722452464 | p00354 | u847360154 | 1561351963 | Python | Python3 | py | Accepted | 20 | 5588 | 85 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,845 |
s151162479 | p00354 | u264450287 | 1561351770 | Python | Python3 | py | Accepted | 20 | 5604 | 571 | X=int(input())
sut=9-7
fri=9-1-7
thu=9-2-7
wed=9-3
tue=9-4
mon=9-5
sun=9-6
if X==sut or X==sut+7 or X==sut+7*2 or X==sut+7*3 or X==sut+7*4:
print("sat")
if X==fri or X==fri+7 or X==fri+7*2 or X==fri+7*3 or X==fri+7*4:
print("fri")
if X==thu+7 or X==thu+7*2 or X==thu+7*3 or X==thu+7*4:
print("thu")
if X==wed or ... | p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,846 |
s520055397 | p00354 | u250040203 | 1561351575 | Python | Python3 | py | Accepted | 20 | 5600 | 191 |
X=int(input())
Day=["mon","tue","wed","thu","fri","sat","sun"]
a=X%7
if a==2 or a==3:
print(Day[a+3])
elif a==4 or a==5 or a==6:
print(Day[a-4])
elif a==0 or a==1:
print(Day[a+3])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,847 |
s178777468 | p00354 | u312033355 | 1561351530 | Python | Python3 | py | Accepted | 20 | 5592 | 201 | x=int(input())
y=x%7
if y==1:
print("fri")
elif y==2:
print("sat")
elif y==3:
print("sun")
elif y==4:
print("mon")
elif y==5:
print("tue")
elif y==6:
print("wed")
elif y==0:
print("thu")
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,848 |
s699271046 | p00354 | u003684951 | 1561351470 | Python | Python3 | py | Accepted | 20 | 5588 | 82 | week=["thu","fri","sat","sun","mon","tue","wed"]
n=int(input())
print(week[n%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,849 |
s102904020 | p00354 | u428848588 | 1561351447 | Python | Python3 | py | Accepted | 20 | 5588 | 82 | W = ["mon","tue","wed","thu","fri","sat","sun"]*10
n = int(input())
print(W[n+3])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,850 |
s422533170 | p00354 | u800408401 | 1561351379 | Python | Python3 | py | Accepted | 20 | 5592 | 237 | x= int(input())
if x%7 == 3:
print("sun")
elif x%7 == 4:
print("mon")
elif x%7 == 5:
print("tue")
elif x%7 == 6:
print("wed")
elif x%7 == 0:
print("thu")
elif x%7 == 1:
print("fri")
elif x%7 == 2:
print("sat")
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,851 |
s898294148 | p00354 | u427219397 | 1561351377 | Python | Python3 | py | Accepted | 30 | 5588 | 82 | M =["mon","tue","wed","thu","fri","sat","sun"]*10
n = int(input())
print(M[n+3])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,852 |
s252638255 | p00354 | u506537276 | 1561351349 | Python | Python3 | py | Accepted | 20 | 5592 | 100 | day = ["fri", "sat", "sun", "mon", "tue", "wed", "thu"]
x = int(input())
print(day[abs(x - 1) % 7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,853 |
s097013386 | p00354 | u814278309 | 1561351324 | Python | Python3 | py | Accepted | 20 | 5588 | 81 | x=int(input())
week=["thu","fri","sat","sun","mon","tue","wed"]
print(week[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,854 |
s857248439 | p00354 | u037441960 | 1561351303 | Python | Python3 | py | Accepted | 20 | 5592 | 111 | day = int(input())
Date = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] * 2
a = day % 7
print(Date[a + 3])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,855 |
s933222953 | p00354 | u015712946 | 1561351181 | Python | Python3 | py | Accepted | 20 | 5588 | 91 |
W = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] * 10
n = int(input())
print(W[n+3])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,856 |
s229786026 | p00354 | u043254318 | 1554170669 | Python | Python3 | py | Accepted | 20 | 5592 | 93 | X = int(input())
table = ["mon","tue","wed","thu","fri","sat","sun"]
print(table[(X+3)%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,857 |
s755396793 | p00354 | u604795501 | 1551765626 | Python | Python3 | py | Accepted | 20 | 5596 | 142 | x_ = input()
x = int(x_)
weeks = ['mon','tue','wed','thu','fri','sat','sun']
week = x%7+3
if week >= 7:
week = week-7
print(weeks[week])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,858 |
s406762011 | p00354 | u435226340 | 1550991376 | Python | Python3 | py | Accepted | 20 | 5588 | 87 | D = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(D[x%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,859 |
s013352919 | p00354 | u717526540 | 1544146949 | Python | Python3 | py | Accepted | 20 | 5588 | 91 | day = ["thu", "fri", "sat", "sun", "mon", "tue", "wed"]
x = int(input())
print(day[x % 7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,860 |
s824509700 | p00354 | u539753516 | 1537589231 | Python | Python3 | py | Accepted | 20 | 5588 | 67 | print(("thu","fri","sat","sun","mon","tue","wed")[int(input())%7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,861 |
s950807768 | p00354 | u631759611 | 1536852464 | Python | Python3 | py | Accepted | 20 | 5588 | 79 | lis = ["thu","fri","sat","sun","mon","tue","wed"]
print(lis[int(input()) % 7])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,862 |
s229150539 | p00354 | u529013669 | 1532965252 | Python | Python3 | py | Accepted | 30 | 6036 | 160 | from datetime import date
weekdays = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
x = int(input())
idx = date(2017, 9, x).weekday()
print(weekdays[idx])
| p00354 |
<!--<H1>X-th day of September</H1>-->
<h1>Day of Week</h1>
<p>
The 9th day of September 2017 is Saturday. Then, what day of the week is the X-th of September 2017?
</p>
<p>
Given a day in September 2017, write a program to report what day of the week it is.
</p>
<h2>Input</h2>
<p>
The input is given in t... | 1
| fri
| 18,863 |
s089738216 | p00355 | u843508808 | 1534744475 | Python | Python3 | py | Accepted | 20 | 5612 | 302 | a, b = map(int, input().split())
n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
line = [0]*1010
line[a] += 1
line[b] -= 1
for a, b in l:
line[a] += 1
line[b] -= 1
for i in range(1006):
line[i+1] += line[i]
if line.count(2):
print(1)
else:
print(0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,864 |
s449321319 | p00355 | u990228206 | 1551434423 | Python | Python3 | py | Accepted | 20 | 5612 | 194 | time=[0]*1001
a,b=list(map(int,input().split()))
n=int(input())
for i in range(n):
s,f=list(map(int,input().split()))
time[s:f]=[1]*(f-s)
if sum(time[a:b])==0:print("0")
else:print("1")
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,865 |
s902977750 | p00355 | u231562319 | 1506979730 | Python | Python3 | py | Accepted | 40 | 7788 | 364 | def main():
a,b = map(int,input().split())
n = int(input())
s,f = [],[]
for i in range(n):
ss,ff = map(int,input().split())
s.append(ss)
f.append(ff)
for i in range(n):
if f[i] <= a or b <= s[i]:
continue
else:
return 1
return 0
... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,866 |
s939071522 | p00355 | u116766943 | 1507125551 | Python | Python3 | py | Accepted | 30 | 7696 | 143 | a,b=map(int,input().split())
c=0
for i in range(int(input())):
s,t=map(int,input().split())
if not (t<=a or b<=s):
c=1
print(c) | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,867 |
s780189013 | p00355 | u546285759 | 1507332028 | Python | Python3 | py | Accepted | 30 | 7712 | 200 | a, b = map(int, input().split())
N = int(input())
flag = 0
for _ in range(N):
s, f = map(int, input().split())
if not (f <= a or b <= s):
flag = 1
break
print(1 if flag else 0) | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,868 |
s079560346 | p00355 | u781622789 | 1523976353 | Python | Python3 | py | Accepted | 20 | 5608 | 295 | a,b = map(int,list(input().split(" ")))
n = int(input())
c = [0 for i in range(1002)]
ans = 0
c[a]+=1
c[b]-=1
for i in range(n):
s,f = map(int,list(input().split(" ")))
c[s]+=1
c[f]-=1
for i in range(1001):
c[i+1] += c[i]
if(c[i]>1):
ans = 1
print(ans)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,869 |
s776620991 | p00355 | u480716860 | 1525013400 | Python | Python3 | py | Accepted | 40 | 5608 | 502 | def ans(res, L, N):
for i in range(N):
count = 0
for new in res:
for k in L[i]:
if(new == k):
count += 1
if(count >= 2):
return 1
return 0
a, b = map(int, input().split())
res = []
for i in range(a,b+1, 1):
res.append(i)... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,870 |
s253296255 | p00355 | u724548524 | 1525547251 | Python | Python3 | py | Accepted | 20 | 5604 | 221 | a, b = map(int,input().split())
t = []
for _ in range(int(input())):
t += list(map(int, input().split()))
print(1 if sum(i <= a for i in t) % 2 or sum(i >= b for i in t) % 2 or sum(a < i and i < b for i in t) else 0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,871 |
s981612795 | p00355 | u568446716 | 1529172997 | Python | Python3 | py | Accepted | 20 | 5600 | 305 | a, b = map(int, input().split())
N = int(input())
books = []
for i in range(N):
books.append(list(map(int, input().split())))
is_booked = 0
for i in range(len(books)):
if books[i][0] <= a < books[i][1]:
is_booked = 1
elif a < books[i][0] < b:
is_booked = 1
print(is_booked)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,872 |
s703346330 | p00355 | u352394527 | 1529937206 | Python | Python3 | py | Accepted | 20 | 5604 | 231 | def check(a, b, lst):
for s, f in lst:
if not(b <= s or f <= a):
return 1
return 0
a, b = map(int, input().split())
n = int(input())
lst = [tuple(map(int, input().split())) for _ in range(n)]
print(check(a, b, lst))
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,873 |
s620642951 | p00355 | u548184870 | 1594290628 | Python | Python3 | py | Accepted | 20 | 5600 | 239 | A, B = map(int, input().split())
N = int(input())
SF = [[0, 0], [1000, 1000]]
for _ in range(N):
SF.append(list(map(int, input().split())))
SF.sort()
R = 1
for i in range(N+1):
if SF[i][1]<=A and B<=SF[i+1][0]:
R = 0
break
print(R)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,874 |
s696857188 | p00355 | u176870835 | 1592516201 | Python | Python3 | py | Accepted | 20 | 5612 | 973 | # N = int(sys.stdin.readline())
# INF = float("inf")
import sys
# N,M = map(int,sys.stdin.readline().split())
# abx = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(M)) # multi line with multi param
# imos=[[0]*(N) for _ in range(N)]
# for a,b,x in abx:
# imos[a-1][b-1] += 1
# if ... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,875 |
s858421709 | p00355 | u593772041 | 1592262584 | Python | Python3 | py | Accepted | 20 | 5656 | 301 | import itertools
a,b = map(int,input().split())
N = int(input())
reserved = [0]*1001
for _ in range(N):
s, f = map(int,input().split())
reserved[s] += 1
reserved[f] -= 1
cumsum = list(itertools.accumulate(reserved))
#print(cumsum)
if sum(cumsum[a:b]):
print(1)
else:
print(0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,876 |
s260513944 | p00355 | u056829778 | 1587972198 | Python | Python3 | py | Accepted | 20 | 5604 | 304 | a,b = list(map(int, input().split()))
n = int(input())
sf = [list(map(int, input().split())) for _ in range(n)]
ans = 0
li = [True] * 1000
sf.sort()
for i in sf:
for j in range(i[0], i[1]):
li[j] = False
for i in range(a,b):
if li[i] == False:
ans = 1
break
print(ans)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,877 |
s661704984 | p00355 | u853741520 | 1580388299 | Python | Python3 | py | Accepted | 20 | 5596 | 167 | x, y = map(int, input().split())
n = int(input())
ans = 0
for _ in range(n):
a, b = map(int, input().split())
if x < b and a < y:
ans = 1
print(ans)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,878 |
s968694946 | p00355 | u829695570 | 1576892774 | Python | Python3 | py | Accepted | 20 | 5596 | 186 | a,b=map(int,input().split())
n = int(input())
t = 0
for i in range(n):
s,f=map(int,input().split())
if s<b<=f or s<=a<f:
t=1
elif a<=s and b>=f:
t=1
print(t)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,879 |
s627390904 | p00355 | u072053884 | 1572437557 | Python | Python3 | py | Accepted | 20 | 5604 | 338 | def solve():
from sys import stdin
f_i = stdin
a, b = map(int, f_i.readline().split())
N = int(f_i.readline())
for i in range(N):
s, f = map(int, f_i.readline().split())
if b <= s or f <= a:
pass
else:
print(1)
break
else:
... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,880 |
s070204565 | p00355 | u668650835 | 1570767677 | Python | Python3 | py | Accepted | 20 | 5600 | 391 | a,b = map(int,input().split())
N = int(input())
n = 1009
reserve = [0]*n
#新しい予約
b = b-1
reserve[a] += 1
reserve[b+1] -= 1
#既存の予約
for i in range(N):
s,f = map(int,input().split())
f = f-1
reserve[s] += 1
reserve[f+1] -= 1
judge = 0
for i in range(n):
if(i != 0): reserve[i] += reserve[i-1]
if(reserve... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,881 |
s397743166 | p00355 | u250040203 | 1564919312 | Python | Python3 | py | Accepted | 20 | 5596 | 204 | a, b =map(int,input().split())
n=int(input())
m=0
for i in range(n):
c,d=map(int,input().split())
if d<=a or c>=b:
pass
else:
m=m+1
if m != 0:
print(1)
else:
print (0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,882 |
s681128380 | p00355 | u821561321 | 1564850277 | Python | Python3 | py | Accepted | 20 | 5600 | 255 | def overlap(a, b, c, d):
if d <= a: return False
if b <= c: return False
return True
a,b = map(int, input().split())
res = 0
for i in range(int(input())):
s, t = map(int, input().split())
if overlap(a, b, s, t): res = 1
print(res)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,883 |
s073994692 | p00355 | u607723579 | 1564638143 | Python | Python3 | py | Accepted | 20 | 5596 | 179 | a, b= map(int,input().split())
N = int(input())
for i in range(N):
c, d = map(int,input().split())
if d <= a or b <= c:continue
else:
print("1")
exit()
print("0")
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,884 |
s397318604 | p00355 | u120055135 | 1564623487 | Python | Python3 | py | Accepted | 20 | 5596 | 178 | a, b= map(int,input().split())
N = int(input())
for i in range(N):
c, d = map(int,input().split())
if d <= a or b <= c:continue
else:
print("1")
exit()
print("0")
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,885 |
s651136187 | p00355 | u221424603 | 1564386134 | Python | Python3 | py | Accepted | 30 | 5596 | 231 | a,b=map(int,input().split())
N=int(input())
judge=0
for i in range(N):
rs,re=map(int,input().split())
if judge==0:
if a<=rs and b>rs:
judge=1
elif a>rs and a<re:
judge=1
print(judge)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,886 |
s690467095 | p00355 | u816538599 | 1564044093 | Python | Python3 | py | Accepted | 20 | 5600 | 256 | def overlap(a, b, c, d):
if d <= a: return False
if b <= c: return False
return True
a, b = map(int, input().split())
res = 0
for i in range(int(input())):
s, t = map(int, input().split())
if overlap(a, b, s, t): res = 1
print(res)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,887 |
s853392276 | p00355 | u312033355 | 1563169296 | Python | Python3 | py | Accepted | 30 | 5596 | 137 | a,b=map(int,input().split())
c=0
for i in range (int(input())):
s,t=map(int,input().split())
if not (t<=a or b<=s):
c=1
print(c)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,888 |
s238573601 | p00355 | u433250944 | 1562766908 | Python | Python3 | py | Accepted | 20 | 5596 | 177 | a,b = map(int,input().split())
n = int(input())
ans = 0
for i in range(n):
A,B = map(int,input().split())
if not (A >= b or B<= a):
ans = 1
print(ans)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,889 |
s750497810 | p00355 | u260980560 | 1561906792 | Python | Python3 | py | Accepted | 20 | 5600 | 176 | a, b = map(int, input().split())
N = int(input())
T = [0]*1001
ok = 0
for i in range(N):
s, f = map(int, input().split())
if s < b and a < f:
ok = 1
print(ok)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,890 |
s464210502 | p00355 | u678843586 | 1561355060 | Python | Python3 | py | Accepted | 20 | 5596 | 144 | a,b=map(int,input().split())
c=0
for i in range(int(input())):
s,t=map(int,input().split())
if not (t<=a or b<=s):
c=1
print(c)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,891 |
s642898485 | p00355 | u264450287 | 1561354896 | Python | Python3 | py | Accepted | 20 | 5608 | 257 | time=[]
a,b=map(int,input().split())
N=int(input())
for i in range(N):
s,f=map(int,input().split())
for i in range(s,f):
time.append(i)
#print(time)
for i in range(a,b):
#print(i)
if i in time:
print(1)
break
elif i==b-1:
print(0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,892 |
s609097673 | p00355 | u351754662 | 1561354504 | Python | Python3 | py | Accepted | 20 | 5596 | 144 | a,b=map(int,input().split())
c=0
for i in range(int(input())):
s,t=map(int,input().split())
if not (t<=a or b<=s):
c=1
print(c)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,893 |
s140563532 | p00355 | u480501638 | 1561353864 | Python | Python3 | py | Accepted | 20 | 5600 | 235 | b,e = map(int,input().split())
r = [0]*1000
for _ in range(int(input())):
b1,e2 =map(int,input().split())
for x in range(b1,e2):
r[x] = 1
def check():
for x in range(b,e):
if r[x] ==1:
return 1
return 0
print(check())
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,894 |
s472939371 | p00355 | u428848588 | 1561353769 | Python | Python3 | py | Accepted | 20 | 5600 | 242 | b,e = map(int,input().split())
r = [0]*1000
for _ in range(int(input())):
b1,e2 =map(int,input().split())
for x in range(b1,e2):
r[x] = 1
def check():
for x in range(b,e):
if r[x] ==1:
return 1
return 0
print(check())
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,895 |
s785953443 | p00355 | u015712946 | 1561353247 | Python | Python3 | py | Accepted | 20 | 5600 | 275 | b,e = map(int, input().split())
r = [0] * 1000
for _ in range(int(input())):
b1, e2 = map(int, input().split())
for x in range(b1, e2):
r[x] = 1
def check():
for x in range(b, e):
if r[x] == 1:
return 1
return 0
print(check())
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,896 |
s628220465 | p00355 | u506537276 | 1561353142 | Python | Python3 | py | Accepted | 20 | 5596 | 227 | a, b = map(int, input().split())
n = int(input())
flag = True
for i in range(n):
aa, bb = map(int, input().split())
if bb <= a or aa >= b:
pass
else:
flag = False
if(flag == True):
print("0")
else:
print("1")
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,897 |
s204825181 | p00355 | u043254318 | 1559757430 | Python | Python3 | py | Accepted | 20 | 5604 | 222 | a,b = [int(i) for i in input().split()]
N = int(input())
ans = 0
for l in range(N):
s,f = [int(i) for i in input().split()]
# if f <= a or b <= s:
if a < f and s < b:
ans = 1
break
print(ans)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,898 |
s734524457 | p00355 | u805464373 | 1557554650 | Python | Python3 | py | Accepted | 20 | 5600 | 398 | a,b=map(int,input().split())
N=int(input())
s=[]
f=[]
h=0
for i in range(N):
int_s,int_f=map(int,input().split())
s.append(int_s)
f.append(int_f)
for j in range(N):
if s[j]<=a and b<=f[j]:
h+=1
break
elif a<=s[j] and f[j]<=b:
h+=1
break
elif s[j]<b<f[j]:
... | p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,899 |
s821061573 | p00355 | u435226340 | 1554025524 | Python | Python3 | py | Accepted | 20 | 5600 | 256 | def overlap(a, b, c, d):
if d <= a: return False
if b <= c: return False
return True
a, b = map(int, input().split())
res = 0
for i in range(int(input())):
s, t = map(int, input().split())
if overlap(a, b, s, t): res = 1
print(res)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,900 |
s464996879 | p00355 | u717526540 | 1544147600 | Python | Python3 | py | Accepted | 20 | 5600 | 235 | a, b = map(int, input().split())
n = int(input())
res = []
for _ in range(n):
s, f = map(int, input().split())
res.append([s, f])
for r in res:
if r[1] > a and r[0] < b:
print(1)
break
else:
print(0)
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,901 |
s671822544 | p00355 | u631759611 | 1536852656 | Python | Python3 | py | Accepted | 20 | 5596 | 176 | n,m = map(int,input().split())
a = int(input())
for i in range(a):
a,b = map(int,input().split())
if b <= n or m <= a:continue
else:
print("1")
exit()
print("0")
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,902 |
s685851427 | p00355 | u871676916 | 1536766380 | Python | Python3 | py | Accepted | 20 | 5596 | 203 | a, b = map(int, input().split())
n = int(input())
booking = True
for i in range(n):
s, f = map(int, input().split())
if(f <= a or b <= s):
continue
else:
booking = False
print(int(not(booking)))
| p00355 |
<H1>Reservation System</H1>
<p>
The supercomputer system L in the PCK Research Institute performs a variety of calculations upon request from external institutes, companies, universities and other entities. To use the L system, you have to reserve operation time by specifying the start and end time. No two reservati... | 5 7
3
1 4
4 5
7 10
| 0
| 18,903 |
s775901480 | p00356 | u388552965 | 1534830225 | Python | Python3 | py | Accepted | 20 | 5596 | 155 | print((lambda x : int(x[0]) + int(x[1]) + 1 - (lambda *x, f=lambda f, x, y: f(f, y, x % y) if y else x: f(f, *x))(int(x[0]),int(x[1])))(input().split()))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,904 |
s032656168 | p00356 | u388552965 | 1534830240 | Python | Python3 | py | Accepted | 20 | 5600 | 154 | print((lambda x : int(x[0]) + int(x[1]) + 1 - (lambda *x, f=lambda f, x, y: f(f, y, x % y) if y else x: f(f, *x))(int(x[0]),int(x[1])))(input().split()))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,905 |
s296390216 | p00356 | u388552965 | 1534830350 | Python | Python3 | py | Accepted | 20 | 5600 | 136 | print((lambda x:int(x[0])+int(x[1])+1-(lambda*x,f=lambda f,x,y:f(f,y,x%y) if y else x:f(f,*x))(int(x[0]),int(x[1])))(input().split()))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,906 |
s178975226 | p00356 | u990228206 | 1551434601 | Python | Python3 | py | Accepted | 20 | 5656 | 74 | import math
x,y=list(map(int,input().split()))
print(x+y-math.gcd(x,y)+1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,907 |
s875905604 | p00356 | u781622789 | 1524016569 | Python | Python3 | py | Accepted | 20 | 5600 | 200 | def gcd(p,q):
if p<q:
return gcd(q,p)
if p%q==0:
return q
else:
return gcd(q,p%q)
x,y = map(int,list(input().split(" ")))
print(x+y+1-gcd(x,y))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,908 |
s437928137 | p00356 | u724548524 | 1525548319 | Python | Python3 | py | Accepted | 20 | 5600 | 157 | x, y = map(int, input().split())
def eu(x, y):
p, q = max(x, y), min(x, y)
while p % q != 0:p, q = q, p % q
return q
print(x + y - eu(x, y) + 1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,909 |
s718761115 | p00356 | u352394527 | 1529937524 | Python | Python3 | py | Accepted | 20 | 5656 | 91 | from math import gcd
x, y = map(int, input().split())
print(x + 1 + y + 1 - gcd(x, y) - 1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,910 |
s247762282 | p00356 | u548184870 | 1594293954 | Python | Python3 | py | Accepted | 20 | 5664 | 110 | import math
a, b = map(int, input().split())
g = math.gcd(a, b)
a1, b1 = a/g, b/g
print(int((a1-1+b1)*g+1))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,911 |
s800984755 | p00356 | u240091169 | 1591239170 | Python | Python3 | py | Accepted | 20 | 5604 | 307 | def GCD(M, N) :
while True :
if N < M :
N, M = M, N
amari = N % M
if amari == 0 :
break
else :
N, M = M, amari
return M
x, y = map(int, input().split())
gcd = GCD(x, y)
x = x / gcd
y = y / gcd
print(int(x-1 + y-1 + 1) * gcd + 1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,912 |
s436201236 | p00356 | u056829778 | 1587973336 | Python | Python3 | py | Accepted | 20 | 5660 | 89 | import math
x,y = list(map(int, input().split()))
gc = math.gcd(x,y)
print(x+y - gc + 1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,913 |
s099824052 | p00356 | u153447291 | 1580637445 | Python | Python3 | py | Accepted | 20 | 5656 | 72 | import math
a,b = map(int,input().split())
print(a+b-(math.gcd(a,b))+1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,914 |
s500149252 | p00356 | u829695570 | 1576968800 | Python | Python3 | py | Accepted | 20 | 5656 | 72 | from math import gcd
x,y=map(int,input().split())
print(x+y-gcd(x,y)+1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,915 |
s107600607 | p00356 | u260980560 | 1561906905 | Python | Python3 | py | Accepted | 20 | 5600 | 159 | def gcd(m, n):
r = m % n
return gcd(n, r) if r else n
x, y = map(int, input().split())
g = gcd(x, y)
print(((x // g - 1) + (y // g - 1) + 1) * g + 1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,916 |
s364448747 | p00356 | u043254318 | 1559819999 | Python | Python3 | py | Accepted | 20 | 5604 | 174 |
def calGCD(x,y):
while(y > 0):
x, y = y, x % y
return x
x,y = [int(i) for i in input().split()]
d = calGCD(x,y)
ans = (x-1) + (y-1) + 2 - (d-1)
print(ans)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,917 |
s491006317 | p00356 | u805464373 | 1557557236 | Python | Python3 | py | Accepted | 20 | 5664 | 126 | import math
x,y=map(int,input().split())
k=math.gcd(x,y)
if k==1:
print(x+y)
else:
m=2*x//k
print(x+y+1-2*x//m)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,918 |
s703983447 | p00356 | u717526540 | 1544147847 | Python | Python3 | py | Accepted | 20 | 5660 | 80 | import math
x, y = map(int, input().split())
g = math.gcd(x, y)
print(x+y-g+1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,919 |
s790353440 | p00356 | u623996423 | 1541493802 | Python | Python3 | py | Accepted | 20 | 5664 | 190 | import math
def intersection(x,y):
g = math.gcd(x, y)
if g == 1:
return x + y
return intersection(x//g, y//g) * g - (g-1)
print(intersection(*map(int, input().split())))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,920 |
s969470484 | p00356 | u843508808 | 1537541200 | Python | Python3 | py | Accepted | 20 | 5604 | 242 | il = lambda: list(map(int, input().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]
def gcd(a, b):
if a < b: return gcd(b, a)
if b == 0: return a
return gcd(b, a%b)
x, y = il()
a = gcd(x, y)
print(x+y-a+1)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,921 |
s193982981 | p00356 | u631759611 | 1536852799 | Python | Python3 | py | Accepted | 50 | 6956 | 86 | import fractions
a,b = map(int,input().split())
print(a + b + 1 -fractions.gcd(a, b))
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,922 |
s588374278 | p00356 | u871676916 | 1536768982 | Python | Python3 | py | Accepted | 20 | 5596 | 129 | a, b = map(int, input().split())
cnt = 0
for x in range(0, a*2+1, 2):
if((b*x) % (2*a) == 0):
cnt += 1
print(a + b - cnt + 2)
| p00356 |
<H1>Wire</H1>
<p>
I am a craftsman specialized in interior works. A customer asked me to perform wiring work on a wall whose entire rectangular surface is tightly pasted with pieces of panels. The panels are all of the same size (2 m in width, 1 m in height) and the wall is filled with an <var>x</var> (horizontal) b... | 4 4
| 5
| 18,923 |
s098432879 | p00363 | u724548524 | 1526887042 | Python | Python3 | py | Accepted | 20 | 5604 | 243 | w, h, a = input().split()
w, h= int(w), int(h)
for i in range(h):
if i in {0, h -1}:print("+" + "-" * (w - 2) + "+")
else:print("|" + "." * ((w - 2) // 2) + a + "." * ((w - 2) // 2) + "|" if i == h // 2 else "|" + "." * (w - 2) + "|")
| p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,924 |
s700583859 | p00363 | u777277984 | 1527682129 | Python | Python3 | py | Accepted | 20 | 5600 | 304 | W, H, c = input().split()
W, H = int(W), int(H)
for i in range(H):
if i == 0 or i == H - 1:
print("+" + "-" * (W-2) + "+")
elif i == H//2:
line = list(("|" + "." * (W-2) + "|"))
line[W//2] = c
print("".join(line))
else:
print("|" + "." * (W-2) + "|")
| p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,925 |
s626561585 | p00363 | u352394527 | 1529942342 | Python | Python3 | py | Accepted | 20 | 5600 | 304 | w, h, c = input().split()
w = int(w)
h = int(h)
end = "+" + "-" * (w - 2) + "+"
center = "|" + "." * ((w - 3) // 2) + c + "." * ((w - 3) // 2) + "|"
common = "|" + "." * (w - 2) + "|"
for i in range(h):
if i in (0, h - 1):
print(end)
elif i == h // 2:
print(center)
else:
print(common)
| p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,926 |
s109437181 | p00363 | u779523319 | 1596780513 | Python | Python3 | py | Accepted | 20 | 5600 | 243 | W,H,c=map(str,input().split())
W,H=int(W),int(H)
for i in range(H):
if i==0 or i==H-1:
print("+"+"-"*(W-2)+"+")
elif i==H//2:
j=(W-2)//2
print("|"+"."*j+c+"."*j+"|")
else:
print("|"+"."*(W-2)+"|")
| p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,927 |
s065581403 | p00363 | u240091169 | 1594865257 | Python | Python3 | py | Accepted | 20 | 5632 | 501 | W, H, c = input().split()
W = int(W)
H = int(H)
for i in range(H) :
for j in range(W) :
if (i == 0 and j == 0) or (i == 0 and j == W-1) or (i == H-1 and j == 0) or (i == H-1 and j == W-1) :
print('+', end='')
elif i == 0 or i == H-1 :
print('-', end='')
elif j == 0 or... | p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,928 |
s939514085 | p00363 | u141099640 | 1594265520 | Python | Python3 | py | Accepted | 20 | 5632 | 403 | w, h, c = input().split()
w, h = int(w), int(h)
for y in range(h):
if y == 0 or y == h - 1:
print('+' + '-' * (w - 2) + '+')
continue
for x in range(w):
if x == 0:
print('|', end='')
elif x == w - 1:
print('|')
elif y == (h - 1) // 2 and x == (w - ... | p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,929 |
s511027898 | p00363 | u108112600 | 1592305446 | Python | Python3 | py | Accepted | 20 | 5632 | 516 | lines = input().split()
w = int(lines[0])
h = int(lines[1])
c = lines[2]
for i in range(h):
for j in range(w):
if i == 0 or i == (h - 1):
if j == 0 or j == (w - 1):
print("+", end="")
else:
print("-", end="")
else:
if i == (h // 2)... | p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,930 |
s993964921 | p00363 | u330854367 | 1583654766 | Python | Python3 | py | Accepted | 20 | 5636 | 446 | W,H,c = input().split()
W,H = int(W),int(H)
for i in range(H):
for j in range(W):
if (j,i) == (0,0) or (j,i) == (0,H-1) or (j,i) == (W-1,0) or (j,i) == (W-1,H-1):
print('+',end='')
elif j in (0,W-1):
print('|',end='')
elif i in (0,H-1):
print('-',end='')
... | p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,931 |
s088227751 | p00363 | u260980560 | 1561911462 | Python | Python3 | py | Accepted | 20 | 5592 | 281 | W, H, c = input().split(); W = int(W); H = int(H)
print("+" + "-"*(W-2) + "+")
for i in range((H-3)//2):
print("|" + "."*(W-2) + "|")
print("|" + "."*((W-3)//2) + c + "."*((W-3)//2) + "|")
for i in range((H-3)//2):
print("|" + "."*(W-2) + "|")
print("+" + "-"*(W-2) + "+")
| p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,932 |
s374906607 | p00363 | u043254318 | 1558546323 | Python | Python3 | py | Accepted | 20 | 5628 | 435 | W,H,c = input().split()
W = int(W)
H = int(H)
for i in range(H):
for j in range(W):
if (i == 0 or i == H-1) and (j == 0 or j == W-1):
print("+", end="")
elif i == 0 or i == H-1:
print("-", end="")
elif j == 0 or j == W-1:
print("|", end="")
elif 2... | p00363 | <!--<H1>Let’s Make a Flag</H1>-->
<h1>Flag</h1>
<p>
AHK Education, the educational program section of Aizu Broadcasting Cooperation, broadcasts a children’s workshop program called "Let's Play and Make." Today’s theme is "Make your own flag." A child writes his first initial in the center of their rectangular flag.
... | 3 3 B
| +-+
|B|
+-+
| 18,933 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.