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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s587219633 | p03679 | u476124554 | 1575379461 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | if a >= b :
print("delicious")
elif b - a <= x:
print("safe")
else:
print("dangerous") |
s658268083 | p03679 | u682985065 | 1574445783 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1282 | import heapq
class UnionFind:
def __init__(self, n):
self.n = n
self.parent = [i for i in range(n)]
self.rank = [0] * n
def find(self, x):
if self.parent[x] != x:
self.parent[x] = self.find(self.parent[x])
return self.parent[x]
def union(self, x, y)... |
s885173810 | p03679 | u638795007 | 1573709612 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1268 | def find(A,x) -> int:
p = A[x]
if p == x:
return x
a = find(A,p)
A[x] = a
return a
def union(A, x, y):
if find(A,x) > find(A,y):
bx, by = find(A,y), find(A,x)
else:
bx, by = find(A,x), find(A,y)
A[y] = bx
A[by] = bx
def examD():
N = I()
x = [... |
s431090290 | p03679 | u778908340 | 1573218445 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 144 | X,A,B = map(int,input().split())
if A >= B:
print('delisious')
elif X >= B - A:
print('safe')
else:
print('dangerous')
|
s494568500 | p03679 | u940061594 | 1572992835 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 159 | #Expired?
X, A, B = map(int, input().split())
Count = -A+B
if Count <= 0:
print("delicious")
elif Cunt <= X:
print("safe")
else:
print("dangerous") |
s614898570 | p03679 | u089376182 | 1569677586 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | x, a, b = map(int, input().split())
print('delicious' if a-b>=0 else 'safe' a+x-b>=0 else 'dangerous') |
s796247070 | p03679 | u672898046 | 1569543660 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | x, a, b = map(int, input().split())
if a>=b:
print("delicious")
else:
if x=<b:
print("safe")
if a+x+1 <= b:
print("dangerous") |
s290056384 | p03679 | u672898046 | 1569541380 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 129 | x, a, b = map(int, input().split())
if a-b > 0:
print("delicious")
if b > x
print("safe")
if b > x+1:
print("dangerous") |
s832162678 | p03679 | u740047492 | 1569351980 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 161 | x, a, b = map(int, input().split())
if x < b - a:
print("dangerous")
elif x <= b - a and 0 < x - (a - b):
primt("safe")
elif 0 >= b - a:
print("delicious") |
s041362473 | p03679 | u740047492 | 1569351755 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | x, a, b = map(int, input().split())
if x < b - a:
print("dangerous")
elif x == b - a:
primt("safe")
elif x <= b - a and 0 <= a - b:
print("delicious") |
s739560337 | p03679 | u740047492 | 1569351512 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 142 | x, a, b = map(int, input().split())
if x < b - a:
print("dangerous")
elif x == b - a:
primt("safe")
elif x <= b - a:
print("delicious")
|
s973701043 | p03679 | u740047492 | 1569351330 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | x, a, b = map(int, input().split())
if x < b - a:
print("dangerous")
elif x <= b - a:
print("delicious")
else:
primt("safe") |
s970192209 | p03679 | u556371693 | 1569295585 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 134 | x,a,b=map(int,input().split())
if b-a=<0:
print('delicious')
elif b-a=<x and not b-a=<0:
print('safe')
else:
print('dangerous')
|
s214868137 | p03679 | u556371693 | 1569295514 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | x,a,b=map(int,input().split())
if -a+b=<0:
print('delicious')
elif -a+b=<x and not -a+b=<0:
print('safe')
else:
print('dangerous') |
s485706163 | p03679 | u131406572 | 1569198676 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | x,a,b=map(int,input().split())
if q-b>=0:
print("delicious")
elif -x<=a-b<0:
print("safe")
else:
print("dangerous") |
s141372103 | p03679 | u131264627 | 1568670872 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 130 | x, a, b = map(int, input().split)
if a >= b:
print('delicious')
elif x + a < b:
print('dangerous')
else:
print('safe') |
s600468565 | p03679 | u597455618 | 1568594537 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 129 | x, a, b = map(int, input().split())
if a-b => 0 :
print('delicious')
elif b-a <= x:
print('safe')
else:
print('dangerous')
|
s711836658 | p03679 | u597017430 | 1568230375 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | X, A, B = map(int, input())
if A-B > X:
print('dangerous')
exit()
elif A-B <= 0:
print('delicious')
exit()
print('safe') |
s984061052 | p03679 | u183896397 | 1567572655 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 159 | X,A,B = (int(i) for i in input().split())
Y = A - B
if Y >= 0:
print('delicious')
elif (-1) * Y =< X :
print('safe')
else:
print('dangerous') |
s161487201 | p03679 | u275861030 | 1567283673 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 131 | x, a, b =map(int, input().split())
if b - a > x
print('dangerous')
elif b - a == x:
print('safe')
else:
print('delicious')
|
s503224981 | p03679 | u882359130 | 1566520575 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 215 | #include<iostream>
using namespace std;
int main(){
int X, A, B;
cin >> X >> A >> B;
if((B - A) <= 0) cout << "delicious";
else if((B - A) > 0 and (B - A) <= X) cout << "safe";
else cout << "dangerous";
} |
s793379897 | p03679 | u219086885 | 1565884156 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 149 | n = int(input())
an = [int(input()) for i in range(n)]
c, s = 1, an[0]
while s != 2 and c < n:
c, s = c + 1, an[s - 1]
print(c if c < n else -1)
|
s096373499 | p03679 | u464912173 | 1565863506 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | X,A,B = map(int,input()split())
print('delicious' if B <= A else 'safe' if B <= A+X else 'dangerous') |
s332887218 | p03679 | u489315616 | 1565748917 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 170 | n = int(input())
nlist = [int(input()) for i in range(n)]
c = 0
x = 1
while x != 2 and c < n:
x = nlist[x - 1]
c += 1
if x == 2:
print(c)
else:
print(-1)
|
s510018524 | p03679 | u489315616 | 1565748420 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38536 | 210 | n = int(input())
nlist = [int(input()) for i in range(n)]
xlist = []
c = 0
x = 1
while x != 2 and x not in xlist:
xlist.append(x)
x = nlist[x - 1]
c += 1
if x == 2:
print(c)
else:
print(-1)
|
s951405239 | p03679 | u469953228 | 1565590121 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | x,a,b=(int(i) for i in input().split())
c = b-c
if c <= 0:
print('delicious')
elif c <= x:
print('safe')
else:
print('dangerous') |
s725002759 | p03679 | u469953228 | 1565590072 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 134 | x,a,b=(int(i) for i in input().split())
c = b-c
if c <= 0:
print('delicious')
elif c < x:
print('safe')
else:
print('dangerous') |
s140642982 | p03679 | u740767776 | 1565003688 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | X, A, B = list(map(int,input().split()))
if A - B <= 0:
print("delicious")
elif A - B <= X:
print("safe")
else:
print("dangerous)
|
s007854532 | p03679 | u670180528 | 1564951426 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 86 | x,a,b=map(int,input().split());print(("delicious,"safe","dangerous")[(b-a>0)+(b-a>x)]) |
s212933217 | p03679 | u904804404 | 1564876527 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 132 | X,A,B = list(map(int,input()))
if A >= B:
print("delicious")
else:
if B-A <= X:
print("safe")
else:
print("dangerous") |
s139121072 | p03679 | u536685012 | 1564722060 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 151 | N = int(input())
n = []
for i in range(N):
n.append(int(input()))
a = 1
c = -1
for i in range(N):
a = n[a-1]
if a == 2:
c = (i+1)
print(c) |
s477635652 | p03679 | u759412327 | 1564430003 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 238 | N = int(input())
a = [0] + [int(input()) for _ in range(N)]
x = 1
visited = set([1])
answer = 0
while True:
x = a[x]
if x in visited:
answer = -1
break
visited.add(x)
answer += 1
if x == 2:
break
print(answer)
|
s825629996 | p03679 | u324549724 | 1563843539 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 127 | x, a, b = map(int. input().split())
if (b <= a) : print('delicious')
elif (x >= b-a) : print('safe')
else : print('dangerous')
|
s213274575 | p03679 | u797016134 | 1563505042 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 175 | x,a,b = map(int, input().split())
if a > b:
print("delicious")
exit()
if a < b and abs(a-b) <= x:
print("safe")
if aa < b and abs(a-b) > x:
print("dangerous") |
s728373938 | p03679 | u764234894 | 1562623895 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | x,a,b=map(int,split())
c = b - a
if c <= 0:
print("delicious")
elif c <= x:
print("safe")
else:
print("dangerous") |
s619110735 | p03679 | u287500079 | 1561907472 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 195 | #https://atcoder.jp/contests/abc065/tasks/abc065_a
x,a,b = map(int,input().split()))
if b-a > x:
print('dangerous')
elif b-a <= x and b-a > 0:
print('safe')
else:
print('delicious') |
s220882416 | p03679 | u096931564 | 1561746305 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 316 | N = int(input())
a = [int(input()) for i in range(N)]
count = 0
index = 1
end = 2
if not end in a:
print(-1)
else :
while(True):
count += 1
index = a[index-1]
if (index == end):
print(count)
break
elif count > N:
print(-1)
break |
s056219693 | p03679 | u096931564 | 1561746184 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 312 | N = int(input())
a = [int(input()) for i in range(N)]
count = 0
index = 1
end = 2
if end in a:
print(-1)
else :
while(True):
count += 1
index = a[index-1]
if (index == end):
print(count)
break
elif count > N:
print(-1)
break |
s359188869 | p03679 | u933341648 | 1561138130 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | x, a, b = map(int, input().split())
print('delicious' if a >= b else 'safe' x >= b-a else 'dangerous') |
s154411073 | p03679 | u933341648 | 1561138058 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | x, a, b = map(int, input().split())
print('delicious' if a >= b else 'safe' x >= b-1 else 'dangerous') |
s648051358 | p03679 | u483640741 | 1560450521 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 183 | n=int(input())
a=[]
for i in range(n):
a.append(int(input()))
cnt=0
ans=-1
x=1
for i in range(n):
x=a[x-1]
cnt+=1
if x==2:
ans=cnt
break
print(ans) |
s881554943 | p03679 | u416758623 | 1559650591 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | x,a,b = map(int, input().split())
if a => b:
print("delicious")
elif b <= x + a:
print("safe")
else:
print("dangerous") |
s587387911 | p03679 | u564060397 | 1558497604 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | x,a,b=map(int,input().split())
if b-a<=o:
print("delicious")
elif b-a<=x:
print("safe")
else:
print("dangerous") |
s382636411 | p03679 | u518042385 | 1557111945 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | a,s,d=map(int,input().split())
if s-d>=0:
print("delicious")
elif a+s-d>=-:
print("safe")
else:
print("dangerous") |
s197097500 | p03679 | u507116804 | 1556723630 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | a,x,b=map(int,input().split())
if b>=a+x+1:
print("dangerous")
elif b<=a+x and a<b:
print("safe")
else:
print(delicious) |
s485120278 | p03679 | u382431597 | 1556447282 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 122 | x,y,z= list(map(int, input().split()))
if y>=z:
print("delicious")
else:
print("safe" if x+a>=b else "dangerous")
|
s808300076 | p03679 | u497596438 | 1556408807 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38640 | 1244 | class UnionFind:
def __init__(self, n):
self.par = [i for i in range(n+1)]
self.rank = [0] * (n+1)
self.size = [1] * (n+1)
# 検索
def find(self, x):
if self.par[x] == x:
return x
else:
self.par[x] = self.find(self.par[x])
return self... |
s760252744 | p03679 | u275710783 | 1556086448 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 137 | a,b,c=map(int,input().split())
if a-b>0:
print("delicious")
else:
if abs(a-b) > x+1:
print("dangerous")
else:
print("safe") |
s887104865 | p03679 | u945419374 | 1555538722 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | x,a,b=map(int,input().split())
if b>a and b-a<x:
print("safe")
elif b=a and b-a=x:
print("delicious")
elif b<a and a-b<x:
print("delicious")
else:
print("dangerous")
|
s479223187 | p03679 | u945419374 | 1555538642 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | x,a,b=map(int,input().split())
if b>a and b-a<x:
print("safe")
elif b=a and b-a=X:
print("delicious")
elif b<a and a-b<x:
print("delicious")
else:
print("dangerous")
|
s737427076 | p03679 | u945419374 | 1555538580 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 171 | x,a,b=map(int,input().split())
if b>a and b-a<x:
print("safe")
elif b=a and b-a=X
print("delicious")
elif b<a and a-b<x:
print("delicious")
else:
print("dangerous")
|
s401070943 | p03679 | u771532493 | 1554814758 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | x,a,b=map(int,input()/split())
if b>=a:
print('delicious')
elif a-b<=x:
print('safe')
else:
print('dangerous')
|
s345511585 | p03679 | u912862653 | 1554059404 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | X, A, B = input().split()
if A-B>=0:
print('delicious')
elif X+A-B>=0:
print('safe')
else:
print('dangerous') |
s623262186 | p03679 | u588081069 | 1553915993 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 178 | N = int(input())
A = [int(input()) for _ in range(N)]
cur = A[1]
for i in range(A[0]):
if cur == 2:
print(i + 1)
break
cur = A[cur]
else:
print(-1)
|
s200944821 | p03679 | u231647664 | 1553210463 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 132 | x, a, b = map(int, input().split())
y = b - a
if y =< 0:
print('delicious')
elif x < y:
print('dangerous')
else:
print('safe') |
s883849881 | p03679 | u878138257 | 1552633318 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 147 | a,b,c = map(int, input().split())
if c-d<=0:
print("delicious")
elif c-d>0 and c-d<=x:
print("safe")
elif c-d>0 and c-d>x:
print("dangerous") |
s754728446 | p03679 | u315392164 | 1552086614 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 646 | n = int(input())
ixy = [[i] + list(map(int, input().split())) for i in range(n)]
ixy.sort(key=lambda x: x[1])
roads = []
for i in range(n - 1):
i1, x1, y1 = ixy[i]
i2, x2, y2 = ixy[i + 1]
roads.append((x2 - x1, i1, i2))
ixy.sort(key=lambda x: x[2])
for i in range(n - 1):
i1, x1, y1 = ixy[i]
i2, x... |
s341689714 | p03679 | u074445770 | 1551932376 | Python | PyPy3 (2.4.0) | py | Runtime Error | 163 | 38256 | 118 | x,a,b=map(int,input().split)
if(a-b>=0):
print('delicious')
elif(b-a<=x):
print('safe')
else:
print('dangerous') |
s854401067 | p03679 | u393512980 | 1551929491 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 129 | X, A, B = input().split()
if B <= A:
print("delicious")
else:
if B - A <= X:
print("safe")
else:
print("dangerous") |
s265483132 | p03679 | u439392790 | 1551755768 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | X,A,B=map(int,input().split())
if C-B>A:
print('dangerous')
elif C-B==A:
print('safe')
else:
print('delicious') |
s752493111 | p03679 | u865413330 | 1551608585 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | x, a, b = int(input().split())
if a >= b:
print("delicious")
elif (b - a) <= x:
print("safe")
else:
print("dangerous") |
s946542786 | p03679 | u722535636 | 1551118925 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | a,b,c=map(int,input().split())
print('delicious' if c<b else 'safe' if c-b<a else 'dengerous')) |
s224447539 | p03679 | u722535636 | 1551118778 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 95 | a,b,c=map(int,input().split())
print('delicious' if b<c else 'safe' if c-b<a else 'dengerous')) |
s301320945 | p03679 | u945418216 | 1551117409 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 189 | n = int(input())
aa = [int(input()) for _ in range(n)]
cur = 1
for i in range(n):
cur = aa[cur-1]
# print(cur)
if cur == 2:
print(i+1)
break
else:
print(-1) |
s141446131 | p03679 | u533679935 | 1546538676 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 159 | X,A,B = map(int,input().split())
if A > B:
print("delicious")
elif A < B and B-A < X+1:
print("safe")
elif A < B and B-A > X+1
print("dangerous") |
s923769471 | p03679 | u239342230 | 1546409956 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | x,a,b=map(int,input().split())
print('delicious' if 0<b-a else 'dangerous' x>b-a else 'safe') |
s186523384 | p03679 | u060936992 | 1546311760 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 132 | x,a,b=gets().chomp().split().map(&:to_i)
if a>=b
puts("delicious")
elsif a+x>=b
puts("safe")
else
puts("dangerous")
end |
s654025677 | p03679 | u887207211 | 1545517084 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 134 | X, A, B = map(int,input().split())
m = B - A
if(m <= 0):
print("delicious")
elif(X => m):
print("safe")
else:
print("dangerous") |
s869122191 | p03679 | u928784113 | 1544512352 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 159 | # -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
print(dangerous)
elif B - A <= X and B - A > 0:
print(safe)
else:
print(delicious) |
s697322397 | p03679 | u330039499 | 1540960312 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 113 | X, A, B = map(int, raw_input().split())
print "delicisous" if A - B >= 0 "safe" if X >= B - A else "dangerous"
|
s599461460 | p03679 | u328755070 | 1540165749 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 143 | X, A, B = list(map(int, input().split()))
if A > B:
ans = 'delicious'
elif B - A <= X:
ans = 'safe'
else:
'dangerous'
print(ans)
|
s970655717 | p03679 | u790877102 | 1538880001 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 198 | import math
n,m = map(int,input().split())
x=0
s = []
for i in range(math.floor(math.sqrt(m)))
if m%i==0:
s.append(i)
for i in s
if m%(i+1)==0 and m//(i+1)>n-1:
x=max(x,i+1)
print(x)
|
s127982002 | p03679 | u444856278 | 1537918463 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 504 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<n;i++)
#define IREP(i,n) for(ll i=1;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define DEBUG(x) cerr << x << "\n"
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int x,a,b;
cin >> x >> a >>... |
s221871918 | p03679 | u826263061 | 1537576117 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 1211 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 21:40:30 2018
ABC065D
@author: maezawa
i=0...n (0-origin)
"""
import heapq
n = int(input())
a = []
b = []
for i in range(n): # i is a name of the city (0-origin)
xy = list(map(int, input().split()))
a.append([i,xy[0]])
b.append([i,xy[1]])
a.sort(key=lambda... |
s581492146 | p03679 | u826263061 | 1537576077 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 1211 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 21:40:30 2018
ABC065D
@author: maezawa
i=0...n (0-origin)
"""
import heapq
n = int(input())
a = []
b = []
for i in range(n): # i is a name of the city (0-origin)
xy = list(map(int, input().split()))
a.append([i,xy[0]])
b.append([i,xy[1]])
a.sort(key=lambda... |
s438316852 | p03679 | u599547273 | 1533366830 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 255 | nums = [1, 1]
def step_div(n):
i = len(nums)
while i <= n:
nums.append(nums[i-1] * i)
i += 1
return nums[n]
n, m = map(int, input().split(" "))
remain = abs(n-m)
if remain <= 1:
print((step_div(n) * step_div(m) * 2) % (10**9+7))
else:
print(0)
|
s537864723 | p03679 | u298892458 | 1531916856 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | tmp = input().split(" ")
if tmp[2]-tmp[1] <= 0:
print("delicious")
elif tmp[2]-tmp[1]>tmp[0] :
print("dangerous")
else :
print("safe") |
s284813981 | p03679 | u735588483 | 1528244854 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | X,A,B=(int(i) for i in input().split())
c=int(B-A)
if c<0:
print('delicious')
elif c<X+1:
print('safe')
elif: c>X+1:
print('dangerous') |
s194493823 | p03679 | u330176731 | 1527392394 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 134 | x,a,b = list(map(int, input().split()))
if a>=b:
print('delicious')
elif b-a =< x:
print('safe')
else:
print('dangerous') |
s130852264 | p03679 | u409064224 | 1525823258 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a = map(int,input().split())
b = a[1] - a[2]
if b > a[0]:
print("dangerous")
elif b > 0:
print("delicious")
else:
print("safe") |
s089743229 | p03679 | u409064224 | 1525822915 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a = map(int,input().split())
b = a[1] - a[2]
if b > a[0]:
print("dangerous")
elif b > 0:
print("delicious")
else:
print("safe") |
s105407413 | p03679 | u409064224 | 1525822890 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a = map(int,input().sprit())
b = a[1] - a[2]
if b > a[0]:
print("dangerous")
elif b > 0:
print("delicious")
else:
print("safe") |
s197530795 | p03679 | u409064224 | 1525822845 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 135 | a = map(int,input(),sprit())
b = a[1] - a[2]
if b > a[0]:
print("dangerous")
elif b > 0:
print("delicious")
else:
print("safe") |
s264699376 | p03679 | u143492911 | 1523237650 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 157 | x,a,b=map(int,input().split())
if b<=a:
print("delicious")
else:
pass=b-a
if pass<=x:
print("safe")
else:
print("dangerous")
|
s502254133 | p03679 | u693211869 | 1523224507 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | x, a, b =map(int,input().split())
s = b - a
if s =< 0:
print('delicious')
elif x > s:
print('safe')
else:
print('dangerouss') |
s579607448 | p03679 | u127856129 | 1521423662 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | a,b,c=map(int,input().split())
if d>c:
print("delicious")
elif abs(b-c)>a:
print("dangerous")
else:
print("safe") |
s987553929 | p03679 | u232429509 | 1516745571 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 157 | x=int(input())
a=int(input())
b=int(input())
if (a+x+1)<=b:
print("dangerous")
elif ((a+x+1)>=b)and(b>a):
print("safe")
else:
print("delicious")
|
s972317387 | p03679 | u667024514 | 1511110524 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | a, b, c = map(int,input().split())
if c-b <= 0:
print("delicious")
elif a+b => c:
print("safe")
else:
print("dangerous") |
s033077699 | p03679 | u667024514 | 1511110437 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 120 | a, b, c = map(int,input().split())
if c-b <=0:
print("delicious")
elif a+b=>c:
print("safe")
else:
print("dangerous") |
s414660112 | p03679 | u772909448 | 1509238165 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 244 | import sys
okDay = int(sys.argv[1])
buyDay = int(sys.argv[2])
eatDay = int(sys.argv[3])
overDay = eatDay - buyDay
if overDay <= 0 :
print("delicious")
sys.exit()
if overDay <= okDay :
print("safe")
sys.exit()
print("dangerous") |
s642105112 | p03679 | u867069435 | 1507504319 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 158 | a = list(map(int, input()))
if a[2] < a[1]:
print("delicious")
elif a[2] >= a[1] and (a[2] - a[0]) > a[1]:
print("safe")
else:
print("dangerous")
|
s183227798 | p03679 | u182399833 | 1507330265 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 500 | # -*- coding: utf-8 -*-
n = int(input())
a = []
for i in range(n):
a.append(int(input()))
if 2 not in a:
print(-1)
else:
cnt = 0
before_num = 1
lighted_bottons = []
while True:
cnt += 1
if a[before_num - 1] == 2:
print(cnt)
break
else:
... |
s048219453 | p03679 | u182399833 | 1507330177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 500 | # -*- coding: utf-8 -*-
n = int(input())
a = []
for i in range(n):
a.append(int(input()))
if 2 not in a:
print(-1)
else:
cnt = 0
before_num = 1
lighted_bottons = []
while True:
cnt += 1
if a[before_num - 1] == 2:
print(cnt)
break
else:
... |
s718278481 | p03679 | u840684628 | 1507327304 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 147 | x, a, b = (int(i) for i in input().split())
if x+a-b > 1:
print('delicious')
else if x+a-b == 0:
print('safe')
else:
print('dangerous')
|
s605681968 | p03679 | u243370518 | 1507243214 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 284 | x = input()
a = []
check = []
for i in range(int(x)):
a.append(int(input()) - 1)
check.append(1)
index = 0
while True:
check[index] = 0
index = a[index]
if check[index] == 0:
print(-1)
break
if index == 1:
print(count)
break |
s755507929 | p03679 | u665415433 | 1505221938 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 247 | N = int(input())
a = [int(input()) for i in range(N)]
num = a[0]
ans = 0
check = 0
for n in range(1, N):
num = a[num-1]
if num-1 == 1:
ans = n + 1
check = 1
break
if check != 1:
print('-1')
else:
print(ans)
|
s735303863 | p03679 | u410363913 | 1502242145 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 218 | first = input()
split_first = first.split()
d = int(split_first[0])
a = int(split_first[1])
b = int(split_first[2])
if a >= b:
print ('delicious')
else if b - a <= d:
print ('safe')
else:
print ('dangerous') |
s415240164 | p03679 | u410363913 | 1502242082 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 218 | first = input()
split_first = first.split()
d = int(split_first[0])
a = int(split_first[1])
b = int(split_first[2])
if a >= b:
print ('delicious')
else if b - a <= d:
print ('safe')
else:
print ('dangerous') |
s332140924 | p03679 | u593227551 | 1502137519 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 190 | l = map(int, raw_input().split())
print(l[0])
print(l[1])
print(l[2])
if (l[2] - l[1]) <= 0:
print("delicious")
elif (l[2] - l[1]) <= l[0]:
print("safe")
else:
print("dangerous") |
s450016515 | p03679 | u950493575 | 1499262661 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 173 | l = list(map(int, input().split()))
if l[1]+l[2] < l[0]:
print("delicious")
else:
if l[2]-l[1] <= l[0]:
print("safe")
else:
print("dangerous")
c
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.