s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s119366135 | p03632 | u443577878 | 1585078161 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | A=input()
B=input()
C=input()
D=input()
print(int(B)-int(C) if C<B else "0") |
s798351674 | p03632 | u891847179 | 1584919012 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 298 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D;
int min, max;
cin >> A >> B >> C >> D;
min = (A > C) ? A : C;
max = (B > D) ? D : B;
if( max < min ){
cout << 0 << endl;
}else{
cout << max - min << endl;
}
return 0;
} |
s973553860 | p03632 | u089142196 | 1584915631 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 66 | A,B,C,D=map(int,input().split())
print(max(0,min(C,D))-max(A,B))) |
s711625221 | p03632 | u993461026 | 1584588994 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | A,B,C,D = map(int, input().rstrip().split())
print(max([A,B]) - min([C,D]) |
s963462108 | p03632 | u078932560 | 1584139211 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 73 | a, b, c, d = list(map(int, input()))
print(max(0, min(b, d) - max(a, c))) |
s309710687 | p03632 | u813174766 | 1583966552 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 63 | a,b,c,d=map(int,input().split())
print(max(0,min(b,d)-max(a,c)) |
s224272330 | p03632 | u757030836 | 1583186648 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 263 | a,b,c,d = map(int,input().split())
if a <= c:
if b <= c:
print(0)
exit()
if b <= d:
print(b-c)
elif b >d:
print(d-c)
if a > c:
if d <= a:
print(0)
eixt()
if d <= b:
print(d-a)
elif d > b:
print(b-a)
|
s114608222 | p03632 | u475598608 | 1583100255 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 63 | ,b,c,d=map(int,input().split())
print(max(0,min(b,d)-max(a,c))) |
s222593587 | p03632 | u072717685 | 1581446013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | a, b, c, d = map(int, input().split())
end = min((a + b),(c + d))
start max(a,c)
r = max(0, end - start)
print(r)
|
s848679094 | p03632 | u347640436 | 1580468412 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | A, B, C, D map(int, input().split())
print(max(min(B, D) - max(A, C), 0))
|
s734163664 | p03632 | u361826811 | 1580400086 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 286 | """
author : halo2halo
date : 29, Jan, 2020
"""
import sys
import itertools
# import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A,B,C,D = map(int,readline().decode('utf8').rstrip())
print(B-C if B>C else 0)
|
s502808541 | p03632 | u880911340 | 1579022190 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 224 | if b<=c:
print(0)
elif d<=a:
print(0)
elif c>=a and d<=b:
print(d-c)
elif c>=a and c<=b and d>=b:
print(b-c)
elif a>=c and a<=d and d<=b:
print(d-a)
elif a>=c and b<=d:
print(b-a)
else:
print(err) |
s491191645 | p03632 | u121921603 | 1578704805 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38384 | 137 | import sys
input = sys.stdin.readline().strip
a,b,c,d=map(int,input().split())
if b<c or d<a:
print(0)
elif print(max(b,d)-min(a,c))
|
s769957281 | p03632 | u007263493 | 1577687486 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 223 | if b<=c and a<= d:
print(0)
elif d >= a and c <= b and a >= c and b <= d:
print(b-c)
elif d >= b and a>=c:
print(b-a)
elif b >=d and c>=a:
print(d-c)
elif c <= a and d <=a:
print(0)
else:
print(d-a) |
s981330895 | p03632 | u148551245 | 1577649972 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 230 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int start = max(a, c);
int end = min(b, d);
if (start < end) cout << end - start << endl;
else cout << 0 << endl;
} |
s241129469 | p03632 | u044638697 | 1577469085 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 290 | A,B,C,D = (int(i) for i in input().split())
Alice_time = set(range(A,B+1))
Bob_time = set(range(C,D+1))
common_time = Alice_time & Bob_time
common_time_list = list(common_time)
common_time_list_sorted = sorted(common_time_list)
print(common_time_list_sorted[-1]-common_time_list_sorted[0])
|
s675685926 | p03632 | u329706129 | 1576867785 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 275 | a, b, c, d = map(int, input().split())
if (b <= c or d <= a): print(0)
elif (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)))
else: print(max(abs(a - b) - abs(a - c) - abs(b - d), abs(c - d) - abs(a - c) - abs(b - d))
|
s292078480 | p03632 | u074338678 | 1575252102 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 202 | a, b, c, d = map(int, input().split())
if a<=c<=b<=d:
print(b-c)
elif b<=a<=d<=c:
print(d-a)
elif a<=c<=d<=b:
print(d-c)
elif c<=a<=b<=d:
print(b-a)
elif b=c or a=d:
print(1)
else:
print(0) |
s562998101 | p03632 | u849029577 | 1575164396 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38640 | 732 | a, b, c, d = map(int, input().split())
alice = []
bob = []
for i in range(a, b+1):
alice.append(i)
#print(alice)
for j in range(c, d+1):
bob.append(j)
#print(bob)
combine_alice_bob = alice + bob
#print(combine_alice_bob)
for i in range(len(alice)):
for j in range(len(bob)):
if (alice[i]==bob[j] an... |
s687706333 | p03632 | u849029577 | 1575163909 | Python | PyPy3 (2.4.0) | py | Runtime Error | 175 | 38768 | 526 | a, b, c, d = map(int, input().split())
alice = []
bob = []
for i in range(a, b+1):
alice.append(i)
#print(alice)
for j in range(c, d+1):
bob.append(j)
#print(bob)
combine_alice_bob = alice + bob
#print(combine_alice_bob)
for i in range(len(alice)):
for j in range(len(bob)):
if (alice[i]==bob[j] an... |
s881325539 | p03632 | u424763114 | 1574986952 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 505 | def main():
i = list(map(int, input().split()))
a = i[0]
b = i[1]
c = i[2]
d = i[3]
if not (0 <= a and a < b and b <= 100 and 0 <= c and c < d and d <= 100):
return
alice = b - a
bob = d -c
if(b <= c or c < b):
print(0)
elif(c < b and b < d):
print(b - ... |
s328978273 | p03632 | u123745130 | 1574920319 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 71 | a,b,c,d=int(input().split())
x=min(b,d)-max(a,c)
print(x if x>0 else 0) |
s122308894 | p03632 | u441320782 | 1574820194 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 237 | A,B,C,D =map(int,input().split())
AB = [str(i) for i in range(A,B+1)]
CD = [str(j) for j in range(C,D+1)]
count = 0
for a in range(101):
if str(a) in AB and str(a) in CD:
count += 1
if count = 0:
print(0)
else:
print(count-1) |
s420034026 | p03632 | u088974156 | 1574801133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 64 | a,b,c,d=map(int.input().split())
print(max(0,min(b,d)-max(a,c))) |
s708771630 | p03632 | u088974156 | 1574800970 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 58 | a,b,c,d=map(int.input().split())
print(min(b,d)-(max(a,c)) |
s752404642 | p03632 | u463775490 | 1573511956 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 52 | a,b,c,d=int(open(0));print(max(0,min(b,d)-max(a,c))) |
s975594437 | p03632 | u993435350 | 1573433258 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 244 | A,B,C,D = map(int,input().split())
inter1 = [i for i in range(A,B + 1)]
inter2 = [i for i in range(C,D + 1)]
inter3 = []
for i in range(0,max(B,D)):
if i in inter1 and i in inter2:
inter3.append(i)
print(max(inter3) - min(inter3)) |
s479263915 | p03632 | u796877631 | 1572804427 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 220 | a = list(input().split())
if max(a[0],a[2]) < min(a[1],a[3]):
print(int(min(a[1],a[3])-int(max(a[0],a[2])))
else if max(a[0],a[2]) >= min(a[1],a[3]):
print(0)
|
s427785805 | p03632 | u537962130 | 1571944192 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38384 | 50 | a,b,c,d=map(int,input().split())
print(max(b-c),0) |
s461283578 | p03632 | u537962130 | 1571944023 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38384 | 50 | a,b,c,d=map(int,input().split())
print(max(b-c),0) |
s942536628 | p03632 | u644907318 | 1571271133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 254 | A,B,C,D = map(int,input().split())
if C<=A:
if D>=B:
print(B-A)
elif A<=D:
print(D-A)
else:
print(0)
elif C<=B:
if D<=B:
print(D-C)
else:
print(B-C)
else:
print(0)
else:
print(0) |
s866705056 | p03632 | u528720841 | 1570596464 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | A, B, C, D = map(int, input().split())
ans = 0
for i in range(1, 101)
if A <= i and i <= B amd C <= i and i <= D:
ans += 1
print(ans) |
s124104857 | p03632 | u705279344 | 1568739781 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 258 | a,b,c,d=map(int, input().split())
answer=0
if a<c:
if b>c:
if b>d:
answer=d-c
else:
answer=b-c
else:
if d>a:
if d>b:
answer=b-aa
else:
answer=d-a
print(answer)
|
s743578757 | p03632 | u934529721 | 1567902813 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 320 | S = list(map(int,input().split()))
if S[0] =< S[1] =< S[2] =< S[3]:
print (0)
elif S[0] =< S[2] =< S[3] =< S[1]:
print(S[3]-S[2])
elif S[0] =< S[2] =< S[1] =< S[3]:
print(S[1] - S[2])
elif S[2] =< S[0] =< S[3] =< S[1]:
print(S[3] - S[0])
elif S[2] =< S[3] =< S[0] =< S[1]:
print(0) |
s016708640 | p03632 | u845442154 | 1567885683 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 200 | a,b,c,d = map(int, (input().split))
if a < c and b < d:
print(b-c)
elif c < a and b < d:
print(b-a)
elif a < c and d < b:
print(d-c)
elif c < a and d < b:
print(d-a)
else:
print(0) |
s369880803 | p03632 | u845442154 | 1567885443 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 198 | a,b,c,d = map(int, input().split)
if a < c and b < d:
print(b-c)
elif c < a and b < d:
print(b-a)
elif a < c and d < b:
print(d-c)
elif c < a and d < b:
print(d-a)
else:
print(0) |
s890315525 | p03632 | u088529499 | 1567885192 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 250 | a=int(input())
b=int(input())
c=int(input())
d=int(input())
if c>=b or d<=a:
print(0)
else:
if a<=c and b<=d:
print(b-c)
elif a<=c and b>d:
print(d-c)
elif a>c and b<=d:
print(b-a)
else:
print(d-a) |
s079418024 | p03632 | u088529499 | 1567885116 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 250 | a=int(input())
b=int(input())
c=int(input())
d=int(input())
if c>=b or d<=a:
print(0)
else:
if a<=c and b<=d:
print(b-c)
elif a<=c and b>d:
print(d-c)
elif a>c and b<=d:
print(b-a)
else:
print(d-a) |
s516195299 | p03632 | u302292660 | 1566947335 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 144 | a,b,c,d = map(int,input().split())
if a<=c:
if b-c>0
print(b-c)
else:
print(0)
else:
if d-a>0:
print(d-a)
else:
print(0) |
s180666724 | p03632 | u475675023 | 1566772100 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | a,b,c,d=map(int,input().split())
s=[]
for i in range(0,101):
if a<=i<=b and c<=i<=d:
s.append(i)
print(max(s)-min(s)) |
s038283670 | p03632 | u273038590 | 1566446046 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | a,b,c,d = map(int,input().split())
if b<c or d<a:
print(0)
elif a<=c<d<=b:
print(d-c)
elif a<c<b<d:
print(b-c)
elif c<a<b<d:
print(b-a)
elif:
print(d-a) |
s638442363 | p03632 | u994988729 | 1566234228 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 170 | n=[0]*101
a,b,c,d=map(int,input().split())
n[a]+=1
n[b+1]-=1
n[c]+=1
n[d+1]-=1
for i in range(100):
n[i+1]+=n[i]
ans=0
for i in n:
if i==2:
ans+=1
print(ans)
|
s902683828 | p03632 | u852517668 | 1565233007 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 91 | A, B, C, D = map(int, input())
s = max(A, C)
e = min(B, D)
span = max(0, e - s)
print(span) |
s285750671 | p03632 | u651879504 | 1565057311 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 223 | A,B,C,D = list(map(int,input().split()))
if B <= C and D <= A:
print(0)
else :
ans_tmp1 = abs(B - C)
ans_tmp2 = abs(D - C)
if ans_tmp1 >= ans_tmp2:
print(ans_tmp2)
else:
print(ans_tmp1)) |
s149793243 | p03632 | u745097373 | 1564682284 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 618 | def solve():
a, b, c, d = read()
result = think(a, b, c, d)
write(result)
def read():
return read_int(4)
def read_int(n):
return list(map(lambda x: int(x), read_line().split(' ')))[:n]
def think(a, b, c, d):
if b <= c or d <= a:
return 0
elif a <= c and d <= b:
return d... |
s704360148 | p03632 | u576375251 | 1564613364 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 281 | # -*- coding: utf-8 -*-
a, b, c, d = map(int, input().split())
if(c < b):
if(d <= b):
if(d <= a):
time = 0
else if(c < a):
time = d - a
else:
time = d - c
else:
time = b - c
else:
time = 0
print(time)
|
s196123423 | p03632 | u324549724 | 1563977622 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 204 | a, b, c, d = map(int, input().split())
row = [0 for i in range(101)]
for i in range(a, b+1) : row[i] += 1
for i in range(c, d+1) : row[i] += 1
if row.count(2) == 0 : print(0)
else : print(raw.count(2)-1)
|
s101150846 | p03632 | u324549724 | 1563977381 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | a, b, c, d = map(int, input().split())
row = [i for i in range(101)]
row[a-1:b] += 1
row[c-1:d] += 1
print(row.count(0))
|
s629096328 | p03632 | u439392790 | 1562869031 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 96 | a,b,c,d=map(int,input().split())
if b>=c:
printabs((min(b,d)-max(a,c)))
else :
print(0)
|
s289860991 | p03632 | u448655578 | 1562533656 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | A,B,C,D = map(int, input().split())
if C < B:
if D < B:
print(D-C)
else:
print(B-C)
else:
print(0)
|
s803617670 | p03632 | u912179452 | 1562470755 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 279 |
if b <= c:
print("0")
elif c <= a:
print("0")
if a<c and (c<b and b<d):
print(b-c)
elif (a<c and a<d) and (c<b and d<b):
print(d-c)
elif (c<a and a<d) and (c<b and b<d):
print(b-a)
elif (c<a and a<d) and (c<b and d<b):
print(d-a)
else:
print("0")
|
s234001453 | p03632 | u912179452 | 1562469579 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 294 | a, b , c ,d = map(int, input().split())
if b<c:
print("0")
elif a<c and (c<b and b<d):
print(b-c)
elif (a<c and c<n) and (a<d and d<b):
print(d-c)
elif (c<a and a<d) and (c<b and b<d):
print(b-a)
elif (c<a and a<d) and (c<b and d<b):
print(d-a)
elif d<a:
print("0")
|
s635212914 | p03632 | u912179452 | 1562467708 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 173 | a, b , c ,d = map(int, input().split())
if b < c:
print("0")
exit()
if c<b and b<d:
print((d-c)-(d-b))
elif a<c adn d<b:
print(d-c)
else:
print("0")
|
s609268762 | p03632 | u314050667 | 1562011779 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 185 | a,b,c,d = list(map(int,input().split()))
if c<=a<=d<=b:
print(d-a)
elif c<=a<=b<=d:
print(b-a)
elif a<=c<=d<=b:
pirnt(d-c)
elif a<=c<=b<=d:
print(b-c)
else:
print(0) |
s676986632 | p03632 | u314050667 | 1562011687 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 173 | a,b,c,d = list(map(int,input().split()))
if c<a<d<b:
print(d-a)
elif c<a<b<d:
print(b-a)
elif a<c<d<b:
pirnt(d-c)
elif a<c<b<d:
print(b-c)
else:
print(0) |
s167069536 | p03632 | u314050667 | 1562010946 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 185 | a,b,c,d = list(map(int,input().split()))
if c<=a<=d<=b:
print(d-a)
elif c<=a<=b<=d:
print(b-a)
elif a<=c<=d<=b:
pirnt(d-c)
elif a<=c<=b<=d:
print(b-c)
else:
print(0) |
s410529379 | p03632 | u259861571 | 1560453024 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | n = int(input())
ans = 1
while n >= 2:
n = n // 2
ans *= 2
print(ans) |
s430024537 | p03632 | u825842302 | 1560382830 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | a,b,c,d = map(int, input())
if b < c or d < a:
ans = 0
else:
ans = min(abs(c-b), abs(d-a))
print(ans)
|
s158783427 | p03632 | u114648678 | 1559436300 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 10 | 0 33 66 99 |
s850388054 | p03632 | u802963389 | 1557081365 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | ABCD = list(map(int,input().split()))
if ABCD[1]<=ABCD[]2 or ABCD[3]<=ABCD[0]:
print(0)
else:
ABCD.sort()
print(ABCD[2]- ABCD[1]) |
s712495946 | p03632 | u166621202 | 1556998546 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | A,B,C,D=map(int,input().split())
if B > C and C < D: # normal
print(B-C)
elif B > C and B > D:
print(D-C)
elif:
print(0)
#elif B < C:
# print(0)
|
s922429311 | p03632 | u655834330 | 1556752835 | Python | PyPy3 (2.4.0) | py | Runtime Error | 161 | 38384 | 415 |
def read_input():
a, b, c, d = map(int, input().split())
return a, b, c, d
def submit():
a, b, c, d = read_input()
if b < c or d < a:
print(0)
return
if a < c:
if d <= b:
print(d - c)
else:
print(b - c)
else:
if b <= d:
... |
s474088197 | p03632 | u318029285 | 1556484851 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | A, B, C, D = (int(x) for x in input().split())
ans = min(B, D) - max(A - C)
if ans < 0:
ans = 0
print(ans) |
s354199854 | p03632 | u660018248 | 1555645283 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 174 | a b c d = map(int, input().split())
if b<=c:
print ('0')
exit()
elif:
if b>=d:
print(d-c)
exit()
elif b<d:
print(b-c)
exit() |
s000195675 | p03632 | u545998622 | 1555387756 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | a,b=map(int,input().split())
c,d=map(int,input().split())
if b>c:
print(b-c)
elese:print("0") |
s022904089 | p03632 | u163320134 | 1555146281 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 163 | a,b,c,d=map(int,input())
if a<=c<=b:
if b<d:
print(b-c)
else:
print(d-c)
elif c<=a<=d:
if b<d:
print(b-a)
else:
print(d-a)
else:
print(0) |
s063041493 | p03632 | u163320134 | 1555146253 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 167 | a,b,c,d=map(int,input())
if a<=c<=b:
if b<d:
print(b-c)
else:
print(d-c):
elif c<=a<=d:
if b<d:
print(b-a)
else:
print(d-a):
else:
print(0) |
s621187423 | p03632 | u501643136 | 1554689703 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 139 | A, B, C, D = map(int, input().split())
if(A<C):
print(max(0, B-D))
if(A>C):
print(max(0, D-B))
if(A=C):
print(min(B-A, D-A))
|
s956331170 | p03632 | u143318682 | 1554131861 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | A, B, C, D = map(int, input().split())
if A <= C:
print(max(min(B, D) - C), 0)
else:
print(max(min(B, D) - A), 0)
|
s949375668 | p03632 | u518042385 | 1553711181 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 72 | a1,a2,b1,b2=map(int,input().split())
print(max(min(a2,b2)-max(b1,a1),0)
|
s230019997 | p03632 | u155236040 | 1553381752 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | a,b,c,d = map(int, input().split())
if b <= c or d <= a:
print(0)
else:
if
print(min(b,d)-max(a,c)) |
s468328087 | p03632 | u305965165 | 1552945877 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 81 | a, b, c, d = (int(i) for i in input().split())
print(max(min(b,d)-(max(a,c), 0)) |
s338094311 | p03632 | u102960641 | 1552489504 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 66 | a,b,c,d = map(int, input().split())
print(max(0,min(b,d)-max(a,c)) |
s998304333 | p03632 | u577123111 | 1550951208 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 314 | A,B,C,D=map(int,input().split())
if A <= C and C <= B and B <= D:
print(B-C)
elif C <= A and A <= B and B <= D:
print(B-A)
elif A <= B and B <= C and C <= D:
print(0)
elif C <= A and A <= D and D <= B:
print(D-A)
elif A <= C and C <= D and D <= B:
print(D-C)
else C <= D and D <= A and A <= B:
print(0) |
s330432328 | p03632 | u013408661 | 1550630772 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 120 | a,b,c,d=map(int,input().split())
Alice=range(a,b+1)
Bob=range(c,d+1)
Alice_Bob=set(Alice)+set(Bob)
print(len(Alice_Bob)) |
s897357247 | p03632 | u371467115 | 1546499404 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 68 | a,b,c,d=map(int,input().split())
print(max(min(b,d)-max(a,c)),0)
|
s262783487 | p03632 | u785578220 | 1545931972 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 136 | a,b,c,d = map(int, input().split())
if a > c:
a,b,c,d = c,d,a,b
if b < c:print(0)
elif b => c and b < d:print(b-c)
else : print(d-c) |
s865338407 | p03632 | u785578220 | 1545931872 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 136 | a,b,c,d = map(int, input().split())
if a > c:
a,b,c,d = c,d,a,b
if b < c:print(0)
elif b => c and b < d:print(b-c)
else : print(d-c) |
s727705071 | p03632 | u928784113 | 1544749954 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 89 | # -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split())
L = [A:B]
M = [C:D]
print(L&M) |
s346705652 | p03632 | u037098269 | 1542922235 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 160 | a,b,c,d = map(int, input().split())
if c >= b or a >= d:
print(0)
else:
if a <= c:
print(min(b-c,d-c))
else:
print(min(d-a,b-a)
|
s746283545 | p03632 | u669770658 | 1542049952 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 297 | def abc070_b():
a, b, c, d = map(int, input().split())
if c > b:
return 0
if c < a < b < d:
return b - a
if a < c < b < d:
return b - c
if a < c < d < b:
return d - c
if __name__ == '__main__':
print(abc048_b()) |
s019060995 | p03632 | u052332717 | 1541521363 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 221 | a,b,c,d = map(int, input().split())
if b<=c:
print(0)
elif a<=c and b<=d:
print(b-c)
elif a<=c and d<=b:
print(d-c)
elif c<=a and b<=d:
print(b-a)
elif c<=a and d<=b:
print(d-a)
elif d<=a
print(0) |
s576200602 | p03632 | u518556834 | 1540060167 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 197 | a,b,c,d = map(int,input().split())
if c < b < d:
print(b-C)
elif a < d < b:
print(d-a)
elif a < c < b and a< d < b:
print(d-c)
elif c < a < d and c < b < d:
print(b-a)
else:
print(int(0)) |
s487202159 | p03632 | u518556834 | 1540060122 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 192 | a,b,c,d = map(int,input().split())
if c < b < d:
print(b-C)
elif a < d < b:
print(d-a)
elif a < c < b and a< d < b:
print(d-c)
elif c < a < d and c < b < d:
print(b-a)
else:
print(0) |
s297468939 | p03632 | u333945892 | 1533833181 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 50 | a,b,c,d = inpl()
print(max(0,(min(b,d)-max(a,c)))) |
s425281406 | p03632 | u717001163 | 1531918090 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 103 | a,b,c,d=map((int,input().split()))
start=min(a,b)
end=min(c,d)
print(end-start if end-start > 0 else 0) |
s361630940 | p03632 | u006657459 | 1530415012 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | A, B, C, D = input().split(' ')
A, B, C, D = int(A), int(B), int(C), int(D)
print(min(min(D, B) - max(C, A), 0) |
s302114858 | p03632 | u006657459 | 1530414976 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | A, B, C, D = input().split(' ')
A, B, C, D = int(A), int(B), int(C), int(D)
print(max(min(D, B) - max(C, A), 0) |
s360391697 | p03632 | u118019047 | 1525400512 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | a,b,c,d = map(int,input().split())
print(max(min(b,d)-max(a,c),0) |
s013711874 | p03632 | u118019047 | 1525400441 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 66 | a,b,c,d = map(int,input().split())
print(max(min(b,d)-max(a,c)),0) |
s724624398 | p03632 | u796424048 | 1524760410 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | A,B,C,D = (map(int,input.split()))
if B<C:
res = 0
else:
res = min(B,D) - max(A<C)
print(res) |
s113368352 | p03632 | u667024514 | 1519987836 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 51 | a,b,c,d = map(int,input())
print(min(b,d)-max(a,c)) |
s001712376 | p03632 | u412116291 | 1516493591 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 81 | a, b, c, d = map(int, input().split())
ans = (b - c) < 0 ? 0 : b - c
print(ans) |
s345817481 | p03632 | u018679195 | 1514352879 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 104 | a, b, c, d = raw_input().split(' ')
time = int(min(b, d)) - int(max(a, c))
print(time if time else 0) |
s909091436 | p03632 | u018679195 | 1514352683 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 87 | a, b, c, d = input().split(' ')
time = min(b, d) - max(a, c)
print(time if time else 0) |
s941752102 | p03632 | u018679195 | 1514352465 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | a, b, c, d = input().split(' ')
time = int(min(b, d)) - int(max(a, c))
print(time if time else 0) |
s328726609 | p03632 | u816631826 | 1514352464 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | a, b, c, d = input().split(' ')
time = int(min(b, d)) - int(max(a, c))
print(time if time else 0) |
s029138710 | p03632 | u209594105 | 1511902538 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 299 | list = input().split()
a = list[0]
b = list[1]
c = list[2]
d = list[3]
result = 0
if a < b and c < d:
if (a >= c and b <= d) or (a <= c and b >= d):
result = min(b-a,d-c)
elif a <= c and c <= b:
result = b - c
elif c <= a and a <= d:
result = d - a
print(result) |
s474691346 | p03632 | u495415554 | 1511409069 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | A, B, C, D = input().split()
value = (min(B, D) - max(A, C))
print(value if value > 0 else "0")
|
s861901768 | p03632 | u825528847 | 1509735644 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 115 | A, B, C, D = map(int, input().split())
res = list(set(range(A, B+1)) & set(range(C, D+1)))
print(res[-1] - res[0])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.