problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03632
u127499732
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(max(max(a,c)-min(b,d),0))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Accepted']
['s589730455', 's945711538']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 64]
p03632
u134712256
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nif b<=c or a>=d :# 1,2\n print(0)\nelse:\n if (a<=c and b<d) or (a<c and b<=d):#2\n print("a",b-c)\n elif a<=c and b>d:\n print("b",d-c)\n elif a>c and b<=d:\n print("c",b-a)\n elif a==c and b==d:\n print(0)', 'a,b,c,d = map(int,input().split())\nif b<=c or a>=d:#1\n print(0)\nelif b<d and a<b<=c:\n print(b-c)\nelif b<d and a>=c:\n print(b-a)\nelif b>=d and a>c:\n print(d-c)\nelif b>=d and a<c:\n print(d-a)\nelif b==d and a==c:\n print(0)\n', 'a,b,c,d = map(int,input().split())\nif b<=c or a>=d:#1\n print(0)\nelif b<d and a<b<=c:\n print(b-c)\nelif b<d and a>=c:\n print(b-a)\nelif b>=d and a>c:\n print(d-c)\nelif b>=d and a<c:\n print(d-a)\nelif b==d and a==c:\n print(b-a)\n', 'a,b,c,d = map(int,input().split())\nif b<=c or a>=d:\n print(0)\nelse:\n if a<=c and b<=d:\n print(b-c)\n elif a<=c and b>d:\n print(d-c)\n elif a>=c and b<=d:\n print(b-a)\n elif a>=c and b>d:\n print(d-a)\n \n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s128574958', 's808459828', 's814588847', 's584640780']
[3064.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[249, 226, 228, 218]
p03632
u143318682
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n\nif A <= C:\n print(max(min(B, D) - C), 0)\nelse:\n print(max(min(B, D) - A), 0)\n', 'A, B, C, D = map(int, input().split())\n\nif A <= C:\n print(max(min(B, D) - C, 0))\nelse:\n print(max(min(B, D) - A, 0))\n']
['Runtime Error', 'Accepted']
['s956331170', 's433308098']
[2940.0, 2940.0]
[17.0, 18.0]
[123, 123]
p03632
u143492911
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b<c:\n print(0)\nelse:\n print((max(b,d)-min(a,c))-((b-a)+(d-c)))', 'a,b,c,d=map(int,input().split())\nif a<=c<=b and a<=d<=b:\n print(d-c)\nelif c<=a<=d and c<=b<=d:\n print(b-a)\nelif a<=c<=b:\n print(b-c)\nelif a<=d<=b:\n print(d-a)\nelse:\n print(0)\n']
['Wrong Answer', 'Accepted']
['s841361109', 's487376321']
[2940.0, 2940.0]
[17.0, 17.0]
[104, 190]
p03632
u146575240
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# Two Switches\nA = list(map(int, input().split()))\ntime = 0\nif A[0]>= A[1] or A[2]>= A[3]:\n time = 0\nelif A[1] >= A[2] or A[3] >= A[0]:\n \n if A[1] >= A[3] >= A[2] >= A[0]:\n time = A[3] - A[2]\n elif A[3] >= A[1] >= A[2] >= A[0]:\n time = A[1] - A[2]\n \n elif A[3] >= A[1] >= A[0] >= A[2]:\n time = A[1] - A[0]\n elif A[1] >= A[3] >= A[0] >= A[2]:\n time = A[3] - A[0]\nelse:\n time = 0\n', '# Two Switches\nA = list(map(int, input().split()))\ntime = 0\n\nif A[1] >= A[2] or A[3] >= A[0]:\n \n if A[1] >= A[3] >= A[2] >= A[0]:\n time = A[3] - A[2]\n elif A[3] >= A[1] >= A[2] >= A[0]:\n time = A[1] - A[2]\n \n elif A[3] >= A[1] >= A[0] >= A[2]:\n time = A[1] - A[0]\n elif A[1] >= A[3] >= A[0] >= A[2]:\n time = A[3] - A[0]\n else:\n time = 0 \nelse:\n time = 0\n\nprint(time)']
['Wrong Answer', 'Accepted']
['s617323846', 's535333905']
[3064.0, 3064.0]
[17.0, 17.0]
[490, 488]
p03632
u155236040
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\nif b <= c or d <= a:\n print(0)\nelse:\n if\n print(min(b,d)-max(a,c))', 'a,b,c,d = map(int, input().split())\nif b <= c or d <= a:\n print(0)\nelse:\n print(min(b,d)-max(a,c))']
['Runtime Error', 'Accepted']
['s230019997', 's934104922']
[2940.0, 2940.0]
[17.0, 17.0]
[111, 104]
p03632
u163320134
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input())\nif a<=c<=b:\n if b<d:\n print(b-c)\n else:\n print(d-c)\nelif c<=a<=d:\n if b<d:\n print(b-a)\n else:\n print(d-a)\nelse:\n print(0)', 'a,b,c,d=map(int,input())\nif a<=c<=b:\n if b<d:\n print(b-c)\n else:\n print(d-c):\nelif c<=a<=d:\n if b<d:\n print(b-a)\n else:\n print(d-a): \nelse:\n print(0)', 'a,b,c,d=map(int,input().split())\nif a<=c<=b:\n if b<d:\n print(b-c)\n else:\n print(d-c)\nelif c<=a<=d:\n if b<d:\n print(b-a)\n else:\n print(d-a)\nelse:\n print(0)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s022904089', 's063041493', 's727673764']
[3060.0, 2940.0, 3188.0]
[17.0, 17.0, 19.0]
[163, 167, 171]
p03632
u166621202
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\n\nif B > C and C < D: # normal\n print(B-C)\nelif B > C and B > D:\n print(D-C)\nelif:\n print(0)\n \n#elif B < C:\n# print(0)\n', 'A,B,C,D=map(int,input().split())\nans = min(B,D) - max(A,C)\nif ans < 0:\n print(0)\nelse:\n print(ans)']
['Runtime Error', 'Accepted']
['s712495946', 's489321195']
[2940.0, 2940.0]
[17.0, 17.0]
[156, 100]
p03632
u167908302
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['#coding:utf-8\n\na, b, c, d = map(int, input().split())\n\nprint(min(c,d)- max(a,b))', '#coding:utf-8\n\na, b, c, d = map(int, input().split())\ntime = min(b,d) - max(a,c)\nprint(max(0, time))\n']
['Wrong Answer', 'Accepted']
['s574532514', 's480402080']
[2940.0, 2940.0]
[18.0, 17.0]
[80, 101]
p03632
u174404613
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['i=input()\nl=map(int,input().split())\nans=min(l[1],l[3])-max(l[0],l[2])\nprint(ans if ans>0 else 0)', 'l=list(map(int,input().split()))\nans=min(l[1],l[3])-max(l[0],l[2])\nprint(ans if ans>0 else 0)']
['Runtime Error', 'Accepted']
['s425870658', 's637350158']
[2940.0, 2940.0]
[17.0, 18.0]
[97, 93]
p03632
u209594105
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['list = input().split()\na = list[0]\nb = list[1]\nc = list[2]\nd = list[3]\nresult = 0\nif a < b and c < d:\n if (a >= c and b <= d) or (a <= c and b >= d):\n result = min(b-a,d-c)\n elif a <= c and c <= b:\n result = b - c\n elif c <= a and a <= d:\n result = d - a\nprint(result)', 'list = input().split()\na = int(list[0])\nb = int(list[1])\nc = int(list[2])\nd = int(list[3])\nresult = 0\nif a < b and c < d:\n if (a >= c and b <= d) or (a <= c and b >= d):\n result = min(b-a,d-c)\n elif a <= c and c <= b:\n result = b - c\n elif c <= a and a <= d:\n result = d - a\nprint(result)']
['Runtime Error', 'Accepted']
['s029138710', 's319089054']
[3064.0, 3064.0]
[18.0, 17.0]
[299, 319]
p03632
u215461917
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['line = [int(i) for i in input().split()]\nv1 = line[0]\nv2 = line[1]\nv3 = line[2]\nv4 = line[3]\n\n\ns = v1 if v3 < v1 else v3\ne = v2 if v4 < v2 else v4\n\nif v2 < v3 :\n print(0)\n exit()\n\ndif = e-s\n\nif dif < 0 : \n print(0)\nelse :\n print(dif)\n\n', '\nline = [int(i) for i in input().split()]\nv1 = line[0]\nv2 = line[1]\nv3 = line[2]\nv4 = line[3]\n\ns1 = set(range(v1,v2+1))\ns2 = set(range(v3,v4+1))\n\ninter = s1.intersection(s2)\n\nres = len(inter)-1\nif res == -1 : res = 0\nprint(res)']
['Wrong Answer', 'Accepted']
['s998211603', 's950908974']
[3064.0, 3064.0]
[18.0, 17.0]
[239, 227]
p03632
u216289806
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\nif a<c:\n max=c\nelse:\n max=a\nif b>d:\n min=d;\nelse:\n min=b\nif (min-max)>0:\n print(min-max)\n print('\\n')\nelse:\n print('0\\n')\nquit()\n", "A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\n print('\\n')\nelse :\n print('0\\n')\nquit()\n", 'A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nprint(0)\n\n', '\na=4\nb=4\nc=4\nd=4\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n\n', "A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\nif a<c:\n max=c\nelse:\n max=a\nif b>d:\n min=d\nelse:\n min=b\nif (min-max)>0:\n print(min-max)\n print('\\n')\nelse:\n print('0\\n')\nquit()\n", "A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\n print('\\n')\nelse :\n print('0\\n')", "A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\n print('\\n')\nelse :\n print('0\\n')\nquit()\n", 'nput()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n', '\n\nA=input().strip()\nB=input().strip()\nC=input().strip()\nD=input().strip()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n', "A=input().strip().sprit(' ')\nB=input().strip().sprit(' ')\nC=input().strip().sprit(' ')\nD=input().strip().sprit(' ')\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n", "A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\nif a<c:\n max=c\nelse:\n max=a\nif b>d:\n min=d;\nelse:\n min=b\nif (min-max)>0:\n print(min-max)\n print('\\n')\nelse:\n print('0\\n')\nquit()\n", 'def gcd(a,b):\n if a<b:\n c=a;\n a=b;\n b=c;\n c=a%b\n\n if c==0:\n return b\n else:\n return gcd(b,c)\n\n\n\n\ndef lcm(a,b):\n c=gcd(a,b);\n return a/c*b\n\n\nn=int(input())\nt=[int(input()) for lop in range(n)]\nans=t[0]\n\nfor lop in range(1,n):\n ans=lcm(ans,t)\nprint(int(ans))', 'A=input()\nB=input()\nC=input()\nD=input()\na=int(A)\nb=int(B)\nc=int(C)\nd=int(D)\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n', 'def gcd(a,b):\n return b\n\n\n\n\n\ndef lcm(a,b):\n return a\n\n\nn=int(input())\nt=[int(input()) for lop in range(n)]\nans=t[0]\n\nfor lop in range(1,n):\n ans=lcm(ans,t)\nprint(int(ans))', "\n\na,b,c,d=[int(i) for i in input().strip().split(' ')]\n\n\n\nmax=0\nmin=0\n\nif a < c :\n max=c\nelse :\n max=a\n \nif b > d :\n min=d\nelse :\n min=b\nif ( min - max ) > 0 :\n print( min - max )\nelse :\n print(0)\n\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s104409136', 's132810984', 's293575276', 's316724655', 's434869019', 's441442631', 's505405727', 's548720115', 's593295201', 's598579284', 's613300248', 's690064400', 's740802861', 's908545973', 's684498123']
[3060.0, 3060.0, 2940.0, 2940.0, 3060.0, 3064.0, 3064.0, 2940.0, 3060.0, 3064.0, 3060.0, 3064.0, 3060.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[226, 264, 87, 180, 225, 243, 251, 235, 272, 314, 226, 312, 238, 180, 257]
p03632
u217303170
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b>c:\n print(b-c-a)\nelif:\n print(0)', 'a,b,c,d=map(int,input().split())\nif min(b,d)-max(a,c)>0:\n print(min(b,d)-max(a,c))\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s191637099', 's661364434']
[8924.0, 9140.0]
[21.0, 25.0]
[76, 104]
p03632
u220345792
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n\nprint(max(B,D) - min(A,C))', 'A, B, C, D = map(int, input().split())\nans = min(B,D) - max(A,C)\nif ans < 0:\n print(0)\nelse:\n print(ans)\n\n']
['Wrong Answer', 'Accepted']
['s611698944', 's141567864']
[2940.0, 2940.0]
[17.0, 17.0]
[66, 108]
p03632
u223646582
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\nprint(max(0,min(C,D)-max(A,B)))', 'A,B,C,D=map(int,input().split())\nprint(max(0,min(B,D)-max(A,C)))']
['Wrong Answer', 'Accepted']
['s526376401', 's021357696']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 64]
p03632
u223904637
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\n\nans=[0]*101\nfor i in range(a,b+1):\n ans[i]+=1\nfor i in range(c,d+1):\n ans[i]+=1\n \nkai=0\nfor i in range(101):\n if ans[i]==2:\n kai+=1\nprint(kai)', 'a,b,c,d=map(int,input().split())\n\nans=[0]*101\nfor i in range(a,b):\n ans[i]+=1\nfor i in range(c,d):\n ans[i]+=1\n \nkai=0\nfor i in range(101):\n if ans[i]==2:\n kai+=1\nprint(kai)']
['Wrong Answer', 'Accepted']
['s905962922', 's581167183']
[3064.0, 3060.0]
[17.0, 19.0]
[195, 191]
p03632
u227082700
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split());print(min(0,min(b,d)-max(a,c)))', 'a,b,c,d=map(int,input().split());print(max(0,min(b,d)-max(a,c)))\n']
['Wrong Answer', 'Accepted']
['s860474474', 's303638421']
[3064.0, 2940.0]
[17.0, 18.0]
[64, 65]
p03632
u235905557
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int, input().split())\nprint (max(B, D) - max(A, C))', '\nA,B,C,D = map(int, input().split())\nalice = set([i for i in range(A, B+1)])\nbob = set([i for i in range(C, D+1)])\nresult = len(alice & bob)\nif result == 0:\n print(0)\nelse:\n print (result)', 'A,B,C,D = map(int, input().split())\nalice = set([i for i in range(A, B)])\nbob = set([i for i in range(C, D)])\nresult = len(alice & bob)\nprint (result)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s001340748', 's778569291', 's378862407']
[2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[65, 194, 150]
p03632
u243492642
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# coding: utf-8\ndef II(): return int(input())\ndef ILI(): return list(map(int, input().split()))\n\n\ndef read():\n A, B, C, D = ILI()\n return A, B, C, D\n\n\ndef solve(A, B, C, D):\n l_ans = [0] * 101\n for a in range(A, B + 1):\n l_ans[a] += 1\n for b in range(C, C + 1):\n l_ans[b] += 1\n\n ans = 0\n for a in l_ans:\n if a == 2:\n ans += 1\n\n if ans != 0:\n ans -= 1\n\n return ans\n\n\ndef main():\n params = read()\n print(solve(*params))\n\n\nif __name__ == "__main__":\n main()\n', '# coding: utf-8\ndef II(): return int(input())\ndef ILI(): return list(map(int, input().split()))\n\n\ndef read():\n A, B, C, D = ILI()\n return A, B, C, D\n\n\ndef solve(A, B, C, D):\n l_ans = [0] * 101\n for a in range(A, B + 1):\n l_ans[a] += 1\n for b in range(C, D + 1):\n l_ans[b] += 1\n\n ans = 0\n for a in l_ans:\n if a == 2:\n ans += 1\n\n if ans != 0:\n ans -= 1\n\n return ans\n\n\ndef main():\n params = read()\n print(solve(*params))\n\n\nif __name__ == "__main__":\n main()\n']
['Wrong Answer', 'Accepted']
['s370659754', 's110441107']
[3064.0, 3064.0]
[17.0, 17.0]
[530, 530]
p03632
u243699903
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(min(0, min(b,d) - max(a,c)))', 'a, b, c, d = map(int, input().split())\nprint(max(0, min(b,d) - max(a,c)))']
['Wrong Answer', 'Accepted']
['s191144645', 's605123170']
[2940.0, 2940.0]
[17.0, 18.0]
[73, 73]
p03632
u244836567
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nd=int(d)\nif b>=c or a>=d:\n print(0)\nif a<=c and b>=d:\n print(d-c)\nelif c<=a and d>=b:\n print(b-a)\nelse:\n if c>=a:\n print(b-c)\n if a>=c:\n print(b-a)', 'a,b,c,d=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nd=int(d)\nif c<a<d:\n if b>d:\n print(d-a)\n else:\n print(b-a)\nif a<=c:\n if b<c:\n print(0)\n elif c<=b<=d:\n print(b-c)\n else:\n print(d-c)\nif a>=d:\n print(0)\n']
['Wrong Answer', 'Accepted']
['s036054539', 's833744538']
[9188.0, 9188.0]
[25.0, 29.0]
[209, 224]
p03632
u254086528
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['n = list(map(int, input().split()))\nprint(n)\n\ndef func1(k,l):\n if k>l:\n return l\n else:\n return k\n\ndef func(x):\n if (x[2]>x[1]) or (x[0]>x[3]):\n print("Check")\n return 0\n else:\n if x[0]>x[2]:\n return (func1(x[1],x[3])-x[0])\n else:\n return (func1(x[1],x[3])-x[2])\n\nprint(func(n))\n', 'n = list(map(int, input().split()))\n\ndef func1(k,l):\n if k>l:\n return l\n else:\n return k\n\ndef func(x):\n if (x[2]>x[1]) or (x[0]>x[3]):\n return 0\n else:\n if x[0]>x[2]:\n return (func1(x[1],x[3])-x[0])\n else:\n return (func1(x[1],x[3])-x[2])\n\nprint(func(n))']
['Wrong Answer', 'Accepted']
['s213755770', 's039096633']
[3060.0, 3064.0]
[17.0, 17.0]
[355, 322]
p03632
u259861571
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['n = int(input())\nans = 1\nwhile n >= 2:\n n = n // 2\n ans *= 2\nprint(ans)', 'a, b , c, d = list(map(int, input().strip().split()))\nlst = []\nlstt = []\nfor i in range(a, b + 1):\n lst.append(i)\n\nfor i in range(c, d+1):\n lstt.append(i)\n\none = set(lst)\ntwo = set(lstt)\n\ninter = one & two\nif len(inter)-1 > 0:\n print(len(inter)-1)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s410529379', 's896376800']
[2940.0, 3064.0]
[17.0, 18.0]
[77, 275]
p03632
u260764548
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# -*- coding:utf-8 -*-\n\nA,B,C,D = map(int,input().split())\n\nif(B<C or A<C):\n print("0")\nelse:\n if(A>=C):\n begin = A\n else:\n begin = C\n if(D<=B):\n end = D\n else:\n end = B\n print(end-begin)\n', '# -*- coding:utf-8 -*-\n\nA,B,C,D = map(int,input().split())\n\nif(B<C or D<A):\n print("0")\nelse:\n if(A>=C):\n begin = A\n else:\n begin = C\n if(D<=B):\n end = D\n else:\n end = B\n print(end-begin)\n']
['Wrong Answer', 'Accepted']
['s397612486', 's009451824']
[2940.0, 2940.0]
[17.0, 17.0]
[234, 234]
p03632
u265118937
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nif b < c:\n print(0)\n exit()\nprint(max(d,b)-min(a,c)) ', 'a,b,c,d = map(int,input().split())\nif b < c:\n print(0)\n exit()\nprint(max(0, min(d,b)-max(a,c)))']
['Wrong Answer', 'Accepted']
['s571646997', 's893616909']
[9092.0, 9124.0]
[28.0, 29.0]
[90, 97]
p03632
u273038590
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nif b<c or d<a:\n print(0)\nelif a<=c<d<=b:\n print(d-c)\nelif a<c<b<d:\n print(b-c)\nelif c<a<b<d:\n print(b-a)\nelif:\n print(d-a)', 'a,b,c,d = map(int,input().split())\nif b<=c or d<=a:\n print(0)\nelif a<=c<=d<=b:\n print(d-c)\nelif a<=c<=b<=d:\n print(b-c)\nelif c<=a<=b<=d:\n print(b-a)\nelif c<=a<=d<=b:\n print(d-a)']
['Runtime Error', 'Accepted']
['s038283670', 's199742091']
[2940.0, 3060.0]
[17.0, 19.0]
[172, 192]
p03632
u285022453
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["A, B, C, D = map(int, input().split(' '))\n\nif B - C < 0 and A > D:\n print(0)\nelif A <= C and D <= B:\n print(C-D)\nelif C <= A and B <= D:\n print(B-A)\nelif C <= A and D <= B:\n print(D-A)", "A, B, C, D = map(int, input().split(' '))\n\nif B < C or A > D:\n print(0)\nelif A <= C and D <= B:\n print(abs(C-D))\nelif C <= A and B <= D:\n print(abs(B-A))\nelif C <= A and D <= B:\n print(abs(D-A))\nelse:\n print(abs(B-C))\n"]
['Wrong Answer', 'Accepted']
['s365600608', 's172016659']
[3060.0, 3060.0]
[17.0, 17.0]
[196, 233]
p03632
u294000907
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\na,b,c,d = map(int, input().split())\n\nif b <= c or a==b or c==d:\n print(0)\nelse:\n print(0)\n', '#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\na,b,c,d = map(int, input().split())\n\nif b <= c or a==b or c==d or d <= a:\n print(0)\nelse:\n print(min(b,d)-max(a,c))\n']
['Wrong Answer', 'Accepted']
['s175901637', 's251432808']
[2940.0, 2940.0]
[17.0, 17.0]
[139, 165]
p03632
u302292660
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nif a<=c:\n if b-c>0\n print(b-c)\n else:\n print(0)\nelse:\n if d-a>0:\n print(d-a)\n else:\n print(0)', 'a,b,c,d = map(int,input().split())\nif a<=c:\n if b-c>0:\n print(min(b-c,d-c))\n else:\n print(0)\nelse:\n if d-a>0:\n print(min(d-a,b-a))\n else:\n print(0)']
['Runtime Error', 'Accepted']
['s516195299', 's521221240']
[2940.0, 2940.0]
[17.0, 17.0]
[144, 163]
p03632
u305965165
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = (int(i) for i in input().split())\n\nprint(max(min(b,d)-(max(a,c), 0))', 'a, b, c, d = (int(i) for i in input().split())\n\nprint(max(min(b,d)-(max(a,c)), 0))']
['Runtime Error', 'Accepted']
['s468328087', 's141208162']
[2940.0, 2940.0]
[18.0, 17.0]
[81, 82]
p03632
u314837274
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A=list(map(int,input().split()))\n\nlist=[0]*101\n\nfor i in range(A[0],A[1]+1):\n list[i]+=1\nfor i in range(A[2],A[3]+1):\n list[i]+=1\nans=0\nfor i in range(len(list)):\n if list[i]==2:\n ans+=1\nprint(ans)', 'A=list(map(int,input().split()))\n\nlist=[0]*101\n\nfor i in range(A[0],A[1]+1):\n list[i]+=1\nfor i in range(A[2],A[3]+1):\n list[i]+=1\n\nprint(list.count(2))', 'A=list(map(int,input().split()))\n\nlist=[0]*101\n\nfor i in range(A[0],A[1]+1):\n list[i]+=1\n\nfor i in range(A[2],A[3]+1):\n list[i]+=1\nif list.count(2)>=1:\n print(list.count(2)-1)\nelse:\n print(0)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s096654860', 's312111237', 's323424897']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[230, 180, 249]
p03632
u316603606
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map (int, input ().split ())\nif A < B:\n X = B\nelse:\n X = A\nif C < D:\n Y = C\nelse:\n Y = D\nprint (Y-X)', 'A,B,C,D = map (int, input ().split ())\nif A < C:\n X = C\nelse:\n X = A\nif B < D:\n Y = B\nelse:\n Y = D\nif Y-X < 0:\n print (0)\nelse:\n print (Y-X)']
['Wrong Answer', 'Accepted']
['s323176692', 's555132225']
[9168.0, 9116.0]
[29.0, 33.0]
[114, 146]
p03632
u318029285
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = (int(x) for x in input().split())\nans = min(B, D) - max(A - C)\nif ans < 0:\n ans = 0\nprint(ans)', 'A, B, C, D = map(int, input().split())\nans = min(B, D) - max(A, C)\nif ans < 0:\n ans = 0\nprint(ans)']
['Runtime Error', 'Accepted']
['s474088197', 's547282497']
[2940.0, 2940.0]
[17.0, 17.0]
[110, 101]
p03632
u324549724
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nrow = [i for i in range(101)]\nrow[a-1:b] += 1\nrow[c-1:d] += 1\nprint(row.count(0))\n', 'a, b, c, d = map(int, input().split())\nrow = [0 for i in range(101)]\nfor i in range(a, b+1) : row[i] += 1\nfor i in range(c, d+1) : row[i] += 1\nprint(row.count(2))\n', 'a, b, c, d = map(int, input().split())\nrow = [0 for i in range(101)]\nfor i in range(a, b+1) : row[i] += 1\nfor i in range(c, d+1) : row[i] += 1\nif row.count(2) == 0 : print(0)\nelse : print(raw.count(2)-1)\n', 'a, b, c, d = map(int, input().split())\nrow = [0 for i in range(101)]\nfor i in range(a, b+1) : row[i] += 1\nfor i in range(c, d+1) : row[i] += 1\nif row.count(2) == 0 : print(0)\nelse : print(row.count(2)-1)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s101150846', 's181706650', 's196123423', 's361891021']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[121, 163, 204, 204]
p03632
u329706129
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nif (b <= c or d <= a): print(0)\nif (b < d or c < a): print(max(abs(a - d) - abs(a - c) - abs(b - d), abs(b - c) - abs(a - c) - abs(b - d)))\nif((a - d) * (b - c) < 0): print(max(abs(a - b) - abs(a - c) - abs(b - d), abs(c - d) - abs(a - c) - abs(b - d)))\n', 'a, b, c, d = map(int, input().split())\nif (b <= c or d <= a): print(0)\nelif (b <= d or c <= a): print(max(abs(a - d) - abs(a - c) - abs(b - d), abs(b - c) - abs(a - c) - abs(b - d)))\nelse: print(max(abs(a - b) - abs(a - c) - abs(b - d), abs(c - d) - abs(a - c) - abs(b - d))\n', 'a, b, c, d = map(int, input().split())\nif (d < a or b < c): print(0)\nelse: print(min(b, d) - max(a, c))\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s521812144', 's675685926', 's717409869']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[293, 275, 104]
p03632
u333945892
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = inpl()\nprint(max(0,(min(b,d)-max(a,c))))', "from collections import defaultdict\nimport sys,heapq,bisect,math,itertools,string,queue,datetime\nsys.setrecursionlimit(10**8)\nINF = float('inf')\nmod = 10**9+7\neps = 10**-7\n\ndef inpl(): return list(map(int, input().split()))\ndef inpl_s(): return list(input().split())\n\na,b,c,d = inpl()\nprint(max(0,(min(b,d)-max(a,c))))"]
['Runtime Error', 'Accepted']
['s297468939', 's428629275']
[2940.0, 4208.0]
[17.0, 29.0]
[50, 318]
p03632
u347600233
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(max(min(c, d) - max(a, b), 0))', 'a, b, c, d = map(int, input().split())\nprint(max(min(b, d) - max(a, c), 0))']
['Wrong Answer', 'Accepted']
['s168585028', 's050130997']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 75]
p03632
u347640436
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D map(int, input().split())\n\nprint(max(min(B, D) - max(A, C), 0))\n', 'A, B, C, D = map(int, input().split())\n\nprint(max(min(B, D) - max(A, C), 0))\n']
['Runtime Error', 'Accepted']
['s848679094', 's175196193']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 77]
p03632
u353519457
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n\ncount = 0\n\nfor i in range(0,101):\n if A <= i and i < B and C <= i and i < D:\n print(i)\n count += 1\n\nprint(count)', 'A, B, C, D = map(int, input().split())\n\n"""\ncount = 0\n\nfor i in range(0,101):\n if A <= i and i < B and C <= i and i < D:\n count += 1\n\nprint(count)\n"""\n\nlower = max(A, C)\nupper = min(B, D)\n\nans = max(0, upper - lower)\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s857511754', 's744078792']
[3060.0, 2940.0]
[17.0, 17.0]
[169, 238]
p03632
u357751375
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int(input().split()))\n\nif b > c:\n print(b - c)\nelse:\n print(0)', 'a,b,c,d = map(int,input().split())\nif max(a,c) > min(b,d):\n print(0)\nelse:\n print(min(b,d) - max(a,c))']
['Runtime Error', 'Accepted']
['s873573398', 's131129859']
[9096.0, 9088.0]
[25.0, 28.0]
[82, 108]
p03632
u361826811
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["\n\nimport sys\nimport itertools\n\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nA,B,C,D = map(int,readline().decode('utf8').rstrip())\n\nprint(B-C if B>C else 0)\n", '\n\nimport sys\nimport itertools\n\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nA, B, C, D = map(int, readline().split())\n\nstart = max(A, C)\nend = min(B, D)\nans = max(0, end - start)\nprint(ans)']
['Runtime Error', 'Accepted']
['s734163664', 's473291001']
[3060.0, 3060.0]
[17.0, 17.0]
[286, 319]
p03632
u364618491
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a[]=list(map(int,input().split()))\nn=min(a[1],a[3])-max(a[0],a[2])\nprint(n if n>0 else 0)', 'a=list(map(int,input().split()))\nn=min(a[1],a[3])-max(a[0],a[2])\nprint(n if n>0 else 0)']
['Runtime Error', 'Accepted']
['s309852493', 's160295314']
[2940.0, 2940.0]
[16.0, 17.0]
[89, 87]
p03632
u366886346
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b<c or a>d:\n print(0)\nelif b>=c:\n print(min(b-c,b-d))\nelse:\n print(min(d-a,d-b))\n', 'a,b,c,d=map(int,input().split())\nif b<c or a>d:\n print(0)\nelif b>=c:\n print(min(abs(b-c),abs(b-d)))\nelse:\n print(min(abs(d-a),abs(d-b)))\n', 'a,b,c,d=map(int,input().split())\nif b<c or a>d:\n print(0)\nelse:\n print(min(b-c,d-a,b-a,d-c))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s357651466', 's645125326', 's730375928']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[126, 146, 99]
p03632
u371467115
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b<c:\n print(abs(b-c))\nelse:\n print(0)\n ', 'a,b,c,d=map(int,input().split())\nprint(max(min(b,d)-max(a,c)),0)\n \n', 'a,b,c,d=map(int,input().split())\nprint(max(min(b,d)-max(a,c),0))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s359121714', 's897357247', 's963174830']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0]
[78, 68, 64]
p03632
u374103100
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["\n\ndef main():\n A, B, C, D = map(int, input().split())\n print(min(C, D) - max(A, B))\n\n\nif __name__ == '__main__':\n main()\n", "\n\ndef main():\n A, B, C, D = map(int, input().split())\n print(max(0, min(B, D) - max(A, C)))\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s756791245', 's534481280']
[2940.0, 2940.0]
[19.0, 17.0]
[181, 189]
p03632
u384793271
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nprint(max(min(b, d) - max(a, c), 0)', 'a, b, c, d = map(int, input().split())\n\nprint(max(0, min(b, d) - max(a, c)))']
['Runtime Error', 'Accepted']
['s710124909', 's951588745']
[9028.0, 9076.0]
[21.0, 29.0]
[75, 76]
p03632
u385244248
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\nif C <= B or D <= A:\n print(0)\nelif A <= C <= D <= B:\n print(D-C)\nelif C <= A <= B <= D:\n print(B-A)\nelif C <= B:\n print(B-C)\nelse:\n print(D-A)\n', 'A = list(map(int,input().split()))\nif A[1] <= A[2] or A[3] <= A[0]:\n print(0)\nelse:\n A.sort()\n print(A[2]-A[1])\n']
['Wrong Answer', 'Accepted']
['s589182178', 's455097347']
[2940.0, 2940.0]
[17.0, 17.0]
[194, 121]
p03632
u388904130
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\nif b >= c:\n if b >= d:\n if a <= c:\n print(d - a)\n else:\n print(d - c)\n else:\n if a <= c:\n print(b - a)\n else:\n print(b - c)\nelse:\n print(0)', 'a,b,c,d = map(int, input().split())\nstart = max(a,c)\nend = min(b,d)\nprint(max(0, end - start))']
['Wrong Answer', 'Accepted']
['s639216219', 's695638371']
[2940.0, 2940.0]
[17.0, 17.0]
[256, 94]
p03632
u393512980
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nl = [0 for _ in range(101)]\nfor i in range(a, b + 1):\n l[i] += 1\nfor i in range(c, d + 1):\n l[i] += 1\nans = 0\nfor i in range(0, 101):\n if l[i] == 2:\n ans += 1\nprint(ans)', 'a, b, c, d = map(int, input().split())\nl = [0 for _ in range(101)]\nfor i in range(a, b):\n l[i] += 1\nfor i in range(c, d):\n l[i] += 1\nans = 0\nfor i in range(0, 101):\n if l[i] == 2:\n ans += 1\nprint(ans)']
['Wrong Answer', 'Accepted']
['s736162010', 's635774078']
[3064.0, 3064.0]
[17.0, 18.0]
[214, 206]
p03632
u397563544
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\n\nif b<=c or c<=b:\n print(0)\nelif a<=c and b<=d:\n print(d-b)\nelif c<=a and d<=b:\n print(b-d)\nelif a<=c and b>=d:\n print(d-c)\nelse:\n print(c-d)', 'a, b, c, d = map(int, input().split())\nprint(max(0, (min(b, d) - max(a, c))))']
['Wrong Answer', 'Accepted']
['s487762002', 's921708452']
[3060.0, 2940.0]
[18.0, 18.0]
[191, 77]
p03632
u398182947
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nprint(a,b,c,d)\n\nNL = []\nfor i in range(a + 1,b + 1):\n NL.append(i)\nfor i in range(c + 1,d + 1):\n NL.append(i)\nNL.sort()\nprint(NL)\n\ncount = 0\nfor i in range(len(NL) - 1):\n if NL[i] == NL[i + 1]:\n count += 1\nprint(count)', 'A,B,C,D = map(int,input().split())\ncounter = 0\nfor i in range(101):\n if (A <= i < B) and (C <= i < D):\n counter += 1\nprint(counter)']
['Wrong Answer', 'Accepted']
['s640265382', 's589998990']
[3064.0, 9076.0]
[17.0, 27.0]
[269, 141]
p03632
u399721252
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = [ int(v) for v in input().split() ]\nd, e = max(a,c), min(b,d)\nf = max((e-d),0)', 'a, b, c, d = [ int(v) for v in input().split() ]\nd, e = max(a,c), min(b,d)\nf = max((e-d),0)\nprint(f)']
['Wrong Answer', 'Accepted']
['s767208222', 's176349122']
[2940.0, 3316.0]
[17.0, 21.0]
[91, 100]
p03632
u405256066
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['from sys import stdin\nA,B,C,D = [int(x) for x in stdin.readline().rstrip().split()]\nAlice = set(range(A,B+1))\nBob = set(range(C,D+1))\nprint(len(Alice & Bob))', 'from sys import stdin\nA,B,C,D = [int(x) for x in stdin.readline().rstrip().split()]\nAlice = set(range(A,B))\nBob = set(range(C,D))\nprint(len(Alice & Bob))']
['Wrong Answer', 'Accepted']
['s912438718', 's843306802']
[3060.0, 3060.0]
[17.0, 17.0]
[159, 155]
p03632
u407730443
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split(" "))\n\nprint(max(0, c-b))', 'a, b, c, d = map(int, input().split(" "))\n\nprint(max(0, min(b, d) - max(a, c)))']
['Wrong Answer', 'Accepted']
['s639275655', 's775428900']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 79]
p03632
u408375121
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nprint(min(0, min(C, D) - max(A, B)))', 'A, B, C, D = map(int, input().split())\nprint(min(0, min(B, D) - max(A, C)))', 'A, B, C, D = map(int, input().split())\nprint(max(0, min(B, D) - max(A, C)))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s060834321', 's118556153', 's836793657']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[75, 75, 76]
p03632
u410118019
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nprint(min(min(a+b,c+d)-max(a,c),0))', 'a,b,c,d = map(int,input().split())\nprint(min(min(b,d)-max(a,c),0))', 'a,b,c,d = map(int,input().split())\nprint(max(min(b,d)-max(a,c),0))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s341341714', 's576851925', 's756920759']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[70, 66, 66]
p03632
u412116291
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nans = (b - c) < 0 ? 0 : b - c\n\nprint(ans)', 'a, b, c, d = map(int, input().split())\n\nstart = a if a > c else c\nend = b if b < d else d\n\nans = 0 if b < c or d < a else end - start\n\n\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s001712376', 's595683307']
[2940.0, 2940.0]
[17.0, 17.0]
[81, 147]
p03632
u424044793
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=[int(i) for i in input().split()]\ne = max(a,b)\nf = min(c,d)\nprint(f-e)', 'a,b,c,d=[int(i) for i in input().split()]\ne = max(a,c)\nf = min(b,d)\ng = f-e\nif g>0:\n print(g)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s723658109', 's965064707']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 115]
p03632
u424763114
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['def main():\n i = list(map(int, input().split()))\n a = i[0]\n b = i[1]\n c = i[2]\n d = i[3]\n\n if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):\n return\n\n alice = b - a\n bob = d -c\n\n if(b <= c or c < b):\n print(0)\n elif(c < b):\n print(b - c)\n elif(a < c and d < b):\n print(d - c)\n elif(a < d):\n print(d - a)\n elif(c < a and b < d):\n print(b - a)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n i = list(map(int, input().split()))\n a = i[0]\n b = i[1]\n c = i[2]\n d = i[3]\n\n if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):\n return\n \n if(b <= c or c < b):\n print(0)\n elif(c < b and b < d):\n print(b - c)\n elif(a <= c and d <= b):\n print(d - c)\n elif(a < d and d < b):\n print(d - a)\n elif(c <= a and b <= d):\n print(b - a)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n i = list(map(int, input().split()))\n a = i[0]\n b = i[1]\n c = i[2]\n d = i[3]\n\n if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):\n return\n \n if(b <= c or c < b):\n print(0)\n elif(c < b and b < d):\n print(b - c)\n elif(a < c and d < b):\n print(d - c)\n elif(a < d and d < b):\n print(d - a)\n elif(c < a and b < d):\n print(b - a)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n i = list(map(int, input().split()))\n a = i[0]\n b = i[1]\n c = i[2]\n d = i[3]\n\n if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):\n return\n\n alice = b - a\n bob = d -c\n\n if(b <= c or c < b):\n print(0)\n elif(c < b and b < d):\n print(b - c)\n elif(a < c and d < b):\n print(d - c)\n elif(a < d and d < b):\n print(d - a)\n elif(c < a and b < d):\n print(b - a)\n\n\nif __name__ == "__main__":\n main(', 'def main():\n i = list(map(int, input().split()))\n a = i[0]\n b = i[1]\n c = i[2]\n d = i[3]\n\n if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):\n return\n if not (isinstance(a, int) and isinstance(b, int) and isinstance(c, int) and isinstance(d, int)):\n return\n \n if(b <= c or d <= a):\n print(0)\n elif(a <= c and c < b and b <= d):\n print(b - c)\n elif(c <= a and a < d and d <= b):\n print(d - a)\n elif(a <= c and d <= b):\n print(d - c)\n elif(c <= a and b <= d):\n print(b - a)\n\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s063515316', 's248950190', 's405080675', 's881325539', 's630935283']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 17.0, 17.0]
[486, 480, 476, 505, 622]
p03632
u425351967
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['import sys\n\nN = input()\n\nfor i in range(len(N)):\n if N[i] != N[len(N)-1-i]:\n print("No")\n sys.exit()\n\nprint("Yes")', 'A, B, C, D = [int(n) for n in input().split()]\n\nend = min(B, D)\nstart = max(A, C)\nprint (max(0,end-start))']
['Wrong Answer', 'Accepted']
['s570845372', 's063365386']
[2940.0, 3060.0]
[17.0, 17.0]
[121, 106]
p03632
u439392790
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b>=c:\n printabs((min(b,d)-max(a,c)))\nelse :\n print(0)\n', 'a,b,c,d=map(int,input().split())\nif b>c and a<d:\n print((min(b,d)-max(a,c)))\nelse :\n print(0)\n']
['Runtime Error', 'Accepted']
['s629096328', 's752374976']
[2940.0, 2940.0]
[17.0, 18.0]
[96, 100]
p03632
u440478998
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\n\nif (b<=c)|(d<=a):\n print(0)\nelse:\n if (a<=c)&(d<=b):\n print(d-c)\n elif (c<=a)&(b<=d):\n print(b-c)\n elif (a<=c)&(b<=d):\n print(b-a)\n else:\n print(c-b)', 'a,b,c,d = map(int, input().split())\n\nif (b<=c)|(d<=a):\n print(0)\nelse:\n if (a<=c)&(d<=b):\n print(d-c)\n else:\n print(c-b)', 'a,b,c,d = map(int, input().split())\n\nif (b<=c)|(d<=a):\n print(0)\nelse:\n if (a<=c)&(b<=d):\n print(b-c)\n elif (c<=a)&(d<=b):\n print(d-a)\n else:\n print(min(d-c,b-a))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s695901029', 's748270849', 's187595621']
[9180.0, 9120.0, 9192.0]
[27.0, 27.0, 26.0]
[229, 143, 195]
p03632
u441320782
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D =map(int,input().split())\nAB = [str(i) for i in range(A,B+1)]\nCD = [str(j) for j in range(C,D+1)]\ncount = 0\n\nfor a in range(101):\n if str(a) in AB and str(a) in CD:\n count += 1\nif count = 0:\n print(0)\nelse:\n print(count-1)', 'A,B,C,D =map(int,input().split())\nAB = [str(i) for i in range(A,B+1)]\nCD = [str(j) for j in range(C,D+1)]\ncount = 0\n\nfor a in range(101):\n if str(a) in AB and str(a) in CD:\n count += 1\nif count == 0:\n print(0)\nelse:\n print(count-1)']
['Runtime Error', 'Accepted']
['s122308894', 's739061545']
[2940.0, 3064.0]
[17.0, 17.0]
[237, 238]
p03632
u443170850
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = input().split()\nA = int(A)\nB = int(B)\nC = int(C)\nD = int(D)\n\n\ndef solve(A, B, C, D):\n if A < C:\n if B < C:\n print("0")\n elif A <= C and D <= B:\n print(str(D-C))\n else:\n ptint(str(B-C))\n else:\n if D < A:\n print("0")\n elif C <= A and B <= D:\n print(str(B-A))\n else:\n print(str(D-A))\n\nsolve(A, B, C, D)\n', 'A, B, C, D = input().split()\nA = int(A)\nB = int(B)\nC = int(C)\nD = int(D)\n\nif A < C:\n if B < C:\n print(0)\n elif A <= C and D <= B:\n print(D-C)\n else:\n ptint(B-C)\nelse:\n if D < A:\n print(0)\n elif C <= A and N <= D:\n print(B-A)\n else:\n print(D-A)\n', 'A, B, C, D = input().split()\nA = int(A)\nB = int(B)\nC = int(C)\nD = int(D)\n\nif A < C:\n if B < C:\n print(0)\n elif A <= C and D <= B:\n print(D-C)\n else:\n ptint(B-C)\nelse:\n if D < A:\n print(0)\n elif C <= A and B <= D:\n print(B-A)\n else:\n print(D-A)\n', 'A, B, C, D = input().split()\nA = int(A)\nB = int(B)\nC = int(C)\nD = int(D)\n\n\ndef solve(A, B, C, D):\n if A < C:\n if B < C:\n return 0\n elif A <= C and D <= B:\n return (D - C)\n else:\n return (B - C)\n else:\n if D < A:\n return 0\n elif C <= A and B <= D:\n return (B - A)\n else:\n return (D - A)\n\nprint(solve(A, B, C, D))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s029578650', 's160247247', 's619670199', 's810462108']
[3316.0, 3060.0, 3060.0, 3060.0]
[22.0, 17.0, 17.0, 17.0]
[427, 304, 304, 426]
p03632
u443577878
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A=input()\nB=input()\nC=input()\nD=input()\nprint(int(B)-int(C) if C<B else "0")', 'A,B,C,D = map(int, input().split())\nx=min(B,D)-max(A,C)\nif x>0:\n print(x)\nelse:\n print("0")']
['Runtime Error', 'Accepted']
['s119366135', 's705071086']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 97]
p03632
u448655578
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int, input().split())\nif C < B:\n if D < B:\n print(D-C)\n else:\n\tprint(B-C)\nelse:\n print(0)\n', 'A,B,C,D = map(int, input().split())\nif C < B:\n print(C-B)\nelse:\n print(0)', 'A,B,C,D = map(int, input().split())\nprint(max(min(B,D)-max(A,C), 0))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s289860991', 's531048723', 's936826647']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[110, 75, 68]
p03632
u451017206
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = [int(i) for i in input().split()]\nprint(min(0,min(B,D) - max(A,C)))', 'A,B,C,D = [int(i) for i in input().split()]\nprint(min(0,min(B,D) - max(A,C))', 'A,B,C,D = [int(i) for i in input().split()]\nprint(max(0,min(B,D) - max(A,C)))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s554011688', 's749829522', 's479646919']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[77, 76, 77]
p03632
u453642820
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\nif C<=B:\n if A>=C:\n if D>=B:\n print(B-C)\n else:\n print(D-C)\n \n else:\n if D>=B:\n print(B-A)\n elif A<=D<B:\n print(D-A)\n else:\n print(0)\nelse:\n print(0)', 'A,B,C,D=map(int,input().split())\nif C<=B:\n print(C-B)\nelse:\n print((B-A)+(D-C))', 'A,B,C,D=map(int,input().split())\nif C<=B:\n if A>=C:\n print(C-B)\n else:\n if D>=B:\n print(B-A)\n else:\n print(D-A)\nelse:\n print((B-A)+(D-C))', 'A,B,C,D=map(int,input().split())\nif C<=B:\n if A<=C:\n if D>=B:\n print(B-C)\n else:\n print(D-C)\n else:\n if D>=B:\n print(B-A)\n elif A<=D<B:\n print(D-A)\n else:\n print(0)\nelse:\n print(0)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s370670881', 's586499069', 's919908450', 's494445788']
[3060.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 18.0]
[288, 85, 189, 279]
p03632
u457901067
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n\nprint(min(min(B, D) - max(A, C),0))', 'A, B, C, D = map(int, input().split())\n\nprint(min(min(B, D), max(A, C),0))', 'A, B, C, D = map(int, input().split())\n\nprint(max(min(B, D) - max(A, C),0))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s355015688', 's653503056', 's089273925']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[75, 74, 75]
p03632
u463775490
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=int(open(0));print(max(0,min(b,d)-max(a,c)))', 'a,b,c,d = map(int,input().split());print(max(0, min(b,d) - max(a,c)))']
['Runtime Error', 'Accepted']
['s752404642', 's024598688']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 69]
p03632
u475598608
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
[',b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Runtime Error', 'Accepted']
['s114608222', 's369975133']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 64]
p03632
u486297080
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['0 75 25 100', 'a,b,c,d = map(int,input().split())\n\nlength = 0\n\nif b <= c or d <= a:\n length = 0\nelif b <= d and c <= d and a <= c:\n length = b - c\nelif d <= b and a <= d and c <= a:\n length = d -a\nelif b <= d and c <= a:\n length = b - a\nelif d <= b and a <= c:\n length = d - c\n\nprint (length)']
['Runtime Error', 'Accepted']
['s447932259', 's311214152']
[2940.0, 3064.0]
[17.0, 18.0]
[11, 292]
p03632
u488178971
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# 070 B \nA,B,C,D= map(int,input().split())\nif B < C or A < D:\n print(0)\n exit()\nif A <= C:\n start =C\nelse:\n start =A\nif B <=D:\n end =B\nelse:\n end =D\nprint(end-start)', '# 070 B \nA,B,C,D= map(int,input().split())\nif B < C:\n print(0)\n exit()\nif D < A:\n print(0)\n exit()\nif A <= C:\n start =C\nelse:\n start =A\nif B <=D:\n end =B\nelse:\n end =D\nprint(end-start)']
['Wrong Answer', 'Accepted']
['s761656989', 's804073552']
[3060.0, 3060.0]
[17.0, 17.0]
[183, 208]
p03632
u492532572
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nprint(min(D - C, B - A, max(0, C - B)))', 'A, B, C, D = map(int, input().split())\nif C < A:\n A, B, C, D = C, D, A, B\nprint(min(D - C, B - A, max(0, B - C)))']
['Wrong Answer', 'Accepted']
['s311203519', 's794189483']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 116]
p03632
u493813116
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# ABC 070 B\n\nA, B, C, D = map(int, input().split())\n\ndef left(a, c):\n if a < c:\n return c\n return a\n\ndef right(b, d):\n if b < d:\n return b\n return d\n\nright(B, D) - left(A, C)', '# ABC 070 B\n\nA, B, C, D = map(int, input().split())\nprint(max(min(B, D) - max(A, C), 0))']
['Wrong Answer', 'Accepted']
['s537127305', 's916347399']
[2940.0, 2940.0]
[17.0, 17.0]
[200, 88]
p03632
u495415554
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = input().split()\nvalue = (min(B, D) - max(A, C))\nprint(value if value > 0 else "0")\n\n', 'A, B, C, D = map(int, input().split())\nvalue = min(B, D) - max(A, C)\nprint(value if value > 0 else "0")\n\n']
['Runtime Error', 'Accepted']
['s474691346', 's504005380']
[2940.0, 3064.0]
[17.0, 18.0]
[97, 105]
p03632
u500415792
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['\nA,B,C,D = map(int, input().split(" "))\n\nif B < C:\n print(0)\n\nelif D < B:\n print(D-C)\n\nelif A < C:\n print(D-A)\n\nelse:\n print(B-C)', 'A,B,C,D = map(int, input().split(" "))\n\nif B < C:\n print(0)\n\nelif D < B:\n print(D-C)\n\nelif A < C:\n print(B-A)\n\nelse:\n print(B-C)', 'A,B,C,D = map(int, input().split(" "))\n\nif max(A ,C) <= min(B, D):\n print(min(B, D) - max(A, C))\n\nelse:\n print(0)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s197973307', 's706923436', 's463262941']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 18.0]
[141, 140, 119]
p03632
u501643136
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nif(A<C):\n print(max(0, B-D))\nif(A>C):\n print(max(0, D-B))\nif(A=C):\n print(min(B-A, D-A))\n ', 'A, B, C, D = map(int, input().split())\nprint(max(0, min(B,D) - max(A,C)))']
['Runtime Error', 'Accepted']
['s621187423', 's363159451']
[2940.0, 2940.0]
[17.0, 18.0]
[139, 73]
p03632
u513375789
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['\nusing namespace std;\n\nint main(void){\n int A,B,C,D;\n cin >> A >> B >> C >> D;\n const int lower = max(A,C);\n const int upper = min(B,D);\n \n cout << max(0,upper-lower) << endl;\n \n return 0;\n}', 'A,B,C,D = map(int,input().split())\nlower = max(A,C)\nupper = min(B,D)\n\nprint(max(0,upper-lower))']
['Runtime Error', 'Accepted']
['s410159024', 's522024464']
[2940.0, 2940.0]
[17.0, 17.0]
[232, 95]
p03632
u514894322
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nprint(max(0,min([b,d])-min([a,c])))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min([b,d])-max([a,c])))']
['Wrong Answer', 'Accepted']
['s037006007', 's099715362']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 68]
p03632
u518042385
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a1,a2,b1,b2=map(int,input().split())\nprint(max(min(a2,b2)-max(b1,a1),0)\n', 'a1,a2,b1,b2=map(int,input().split())\nprint(max(min(a2,b2)-max(b1,a1),0))\n']
['Runtime Error', 'Accepted']
['s949375668', 's906098554']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 73]
p03632
u518556834
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nif c < b < d:\n print(b-C)\nelif a < d < b:\n print(d-a)\nelif a < c < b and a< d < b:\n print(d-c)\nelif c < a < d and c < b < d:\n print(b-a)\nelse:\n print(0)', 'a,b,c,d = map(int,input().split())\nif c < b < d:\n print(b-C)\nelif a < d < b:\n print(d-a)\nelif a < c < b and a< d < b:\n print(d-c)\nelif c < a < d and c < b < d:\n print(b-a)\nelse:\n print(int(0))', 'a,b,c,d = map(int,input().split())\nans = 0\nfor i in range(101):\n if a <= i < b and c <= i < d:\n ans += 1\nprint(ans)\n \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s487202159', 's576200602', 's715163517']
[3060.0, 2940.0, 2940.0]
[19.0, 17.0, 18.0]
[192, 197, 123]
p03632
u518958552
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nans = min(b,\u3000d) - max(a,\u3000c)\nif ans < 0:\n print(0)\nelse:\n print(ans)', 'a,b,c,d = map(int,input().split())\nans = min(b,d) - max(a,c)\nif ans < 0:\n print(0)\nelse:\n print(ans)']
['Runtime Error', 'Accepted']
['s957903550', 's160086581']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 106]
p03632
u519923151
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = input().split()\n\nprint(max((min(b,d)-max(a,c)),0))', 'a,b,c,d = map(int, input().split())\n\nprint(max((min(b,d)-max(a,c)),0))']
['Runtime Error', 'Accepted']
['s099667719', 's486374338']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 70]
p03632
u528720841
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nif B < C:\n print(0)\nelse:\n print(C - B)', 'A, B, C, D = map(int, input().split())\nans = 0\nfor i in range(1, 101)\nif A <= i and i <= B amd C <= i and i <= D:\n ans += 1\nprint(ans)', 'A, B, C, D = map(int, input().split())\nans = 0\nfor i in range(0, 101):\n if A <= i and i < B and C <= i and i < D:\n ans += 1\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s264340477', 's866705056', 's552138259']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[80, 135, 138]
p03632
u542932305
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\nresult = 0\n\nif b > c:\n result = b-c\nif b > d:\n result -= b-d\nif a > c:\n result -= a-c\n\nprint(result if result < 0 else 0)', 'a,b,c,d = map(int, input().split())\nresult = 0\n\nif b > c:\n result = b-c\nif b > d:\n result -= b-d\nif a > c:\n result -= a-c\n\nprint(result if result >= 0 else 0)']
['Wrong Answer', 'Accepted']
['s846794414', 's753410845']
[2940.0, 2940.0]
[18.0, 17.0]
[166, 167]
p03632
u543954314
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nt = min(c,d) - max(a,b)\nprint(max(t, 0))', 'a, b, c, d = map(int, input().split())\nt = min(b,d) - max(a,c)\nprint(max(t, 0))']
['Wrong Answer', 'Accepted']
['s618103548', 's727172832']
[2940.0, 2940.0]
[18.0, 17.0]
[79, 79]
p03632
u545998622
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b=map(int,input().split())\nc,d=map(int,input().split())\nif b>c:\n print(b-c)\nelese:print("0")', 'A, B, C, D = map(int, input().split())\nprint(max(0, min(B, D) - max(A, C)))']
['Runtime Error', 'Accepted']
['s000195675', 's299421158']
[2940.0, 2940.0]
[17.0, 17.0]
[97, 75]
p03632
u546853743
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["\na,b,c,d=map(int,input().split())\nif b<=c:\n print('0')\nelse:\n print(min(b-a,d-c))", "a,b,c,d=map(int,input().split())\nif b<=c or d<=a:\n print('0')\nelse:\n print(min(b-a,d-c),min(b-c,d-a))", "a,b,c,d=map(int,input().split())\nif b<=c or d<=a:\n print('0')\nelif b<=d:\n print(min(b-c,b-a))\nelse:\n print(min(d-a,d-c))"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s528266563', 's898328564', 's048130009']
[9144.0, 9140.0, 9184.0]
[28.0, 31.0, 30.0]
[87, 107, 129]
p03632
u548545174
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nif A < C and B < D:\n print(D - A)\nelif C <= A and B < D:\n print(D - C)\nelif A < C and D <= B:\n print(B - A)\nelse:\n print(B - C)', 'if max(A, C) < min(B, D):\n print(min(B, D) - max(A, C))\nelse:\n print(0)', '\nA, B, C, D = map(int, input().split())\n\nif max(A, C) < min(B, D):\n print(min(B, D) - max(A, C))\nelse:\n print(0)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s411744273', 's482486533', 's643616190']
[3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[178, 77, 118]
p03632
u550574002
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(-a+b-c+d)', 'a,b,c,d=map(int,input().split())\nprint(-a+b-c+d+2)', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s509154457', 's540293107', 's066300760']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[48, 50, 64]
p03632
u551109821
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\n\ns = min(B-C,D-C)\n\nif s <= 0:\n s = 0\n\nprint(s', 'A,B,C,D = map(int,input().split())\n\ns = max(A,C)-min(B,D)\n\nif s <= 0:\n s = 0\n\nprint(s)', 'A,B,C,D = map(int,input().split())\n\nprint(max(B-C,D-C))', 'A,B,C,D = map(int,input().split())\n\ns = min(B,D)-max(A,C)\n\nif s <= 0:\n s = 0\n\nprint(s)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s386740222', 's474586355', 's921422612', 's080321067']
[3064.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[83, 89, 55, 89]
p03632
u576375251
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# -*- coding: utf-8 -*-\na, b, c, d = map(int, input().split())\nif(c < b):\n if(d <= b):\n if(d <= a):\n time = 0\n else if(c < a):\n time = d - a\n else:\n time = d - c\n else:\n time = b - c\nelse:\n time = 0\nprint(time)\n', '# -*- coding: utf-8 -*-\na, b, c, d = map(int, input().split())\nif(c < b):\n if(d <= b):\n if(d <= a):\n time = 0\n elif(c < a):\n time = d - a\n else:\n time = d - c\n elif (c < a):\n time = b - a\n else:\n time = b - c\nelse:\n time = 0\nprint(time)\n']
['Runtime Error', 'Accepted']
['s704360148', 's762758831']
[3064.0, 3060.0]
[17.0, 18.0]
[281, 317]
p03632
u576917603
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(a,b,c,d)\nal=[]\nbl=[]\nfor i in range(a,b+1):\n al.append(i)\nfor i in range(c,d+1):\n bl.append(i)\nalbl=set(al)&set(bl)\nif len(albl)==0:\n print(0)\nelse:\n print(len(albl)-1)', 'a,b,c,d=map(int,input().split())\nal=[]\nbl=[]\nfor i in range(a,b+1):\n al.append(i)\nfor i in range(c,d+1):\n bl.append(i)\nalbl=set(al)&set(bl)\nif len(albl)==0:\n print(0)\nelse:\n print(len(albl)-1)']
['Wrong Answer', 'Accepted']
['s351485019', 's907452454']
[3064.0, 3064.0]
[17.0, 17.0]
[219, 204]
p03632
u577123111
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\nif A <= C and C <= B and B <= D:\n print(B-C)\nelif C <= A and A <= B and B <= D:\n print(B-A)\nelif A <= B and B <= C and C <= D:\n print(0)\nelif C <= A and A <= D and D <= B:\n print(D-A)\nelif A <= C and C <= D and D <= B:\n print(D-C)\nelse C <= D and D <= A and A <= B:\n print(0)', 'A,B,C,D=map(int,input().split())\nif A <= C and C <= B and B <= D:\n print(B-C)\nelif C <= A and A <= B and B <= D:\n print(B-A)\nelif A <= B and B <= C and C <= D:\n print(0)\nelif C <= A and A <= D and D <= B:\n print(D-A)\nelif A <= C and C <= D and D <= B:\n print(D-C)\nelif C <= D and D <= A and A <= B:\n print(0)']
['Runtime Error', 'Accepted']
['s998304333', 's920420129']
[2940.0, 3064.0]
[17.0, 18.0]
[314, 314]
p03632
u580362735
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['ABCD = list(map(int,input().split()))\nprint(sorted(ABCD)[2]-sorted(ABCD)[1]) if ABCD[1] - ABCD[2] < 0 else print(0)', 'ABCD = list(map(int,input().split()))\nprint(sum(sorted(ABCD)[1:3])) if ABCD[1] - ABCD[2] < 0 else print(0)', 'A,B,C,D = map(int,input().split())\nprint(min(B,D) - max(A,C)) if min(B,D) - max(A,C) <= 0 else print(0)', 'A,B,C,D = map(int,input().split())\nprint(min(B,D) - max(A,C)) if min(B,D) - max(A,C) >= 0 else print(0)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s404130271', 's835678955', 's890677754', 's639738188']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[115, 106, 103, 103]
p03632
u582084082
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nif b >= c:\n if a >= c:\n print(b - c)\n else:\n print((b - c) - (c - a))\nelse:\n print(0)', 'a, b, c, d = map(int, input().split())\nprint(max(0, min(b, d) - max(a, c)))']
['Wrong Answer', 'Accepted']
['s115509813', 's252754153']
[9040.0, 9052.0]
[27.0, 28.0]
[147, 75]
p03632
u608088992
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nP = [0 for _ in range(202)]\nfor p in range(A, A + B + 1): P[p] += 1\nfor p in range(C, C + D + 1): P[p] += 1\ncount = 0\nfor p in P:\n if p == 2: count += 1\nprint(count)', 'import sys\n\ndef solve():\n input = sys.stdin.readline\n A, B, C, D = map(int, input().split())\n double = 0\n for i in range(101):\n if A <= i <= B and C <= i <= D: double += 1\n print(double - 1 if double > 1 else 0)\n\n return 0\n\nif __name__ == "__main__":\n solve()']
['Wrong Answer', 'Accepted']
['s788323409', 's893461533']
[3060.0, 3060.0]
[17.0, 17.0]
[205, 289]
p03632
u608726540
2,000
262,144
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 his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif -max(a,c)+min(b,d)>=0:\n print(max(a,c)-min(b,d))\nelse:\n print(0)\n', 'a,b,c,d=map(int,input().split())\nif -max(a,c)+min(b,d)>=0:\n print(-max(a,c)+min(b,d))\nelse:\n print(0)\n']
['Wrong Answer', 'Accepted']
['s005622936', 's142162162']
[2940.0, 2940.0]
[17.0, 17.0]
[107, 108]