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
s901463587
p03738
u918808222
1557347347
Python
Python (3.4.3)
py
Runtime Error
17
2940
81
a, b = map(int, input().split()) print(['LESS', 'GEATER', 'EQUAL'][(a>b)-(a==b)])
s770247635
p03738
u278886389
1556929797
Python
Python (3.4.3)
py
Runtime Error
17
3060
360
A,B = input().split(" ") def compare(A,B): if A == B: return 'EQUAL' if len(A) > len(B): return 'GREATER' if len(B) > len(A): return 'LESS' for i in range(len(A)): a = int(A[i]) b = int(B[i]) if a > b: return 'GREATER' if b > a: return 'LESS' print(compare(A,B))
s655561385
p03738
u767664985
1556515714
Python
Python (3.4.3)
py
Runtime Error
18
2940
109
A, B = eval("int(input())" * 2) if A > B: print("GREATER") elif A < B: print("LESS") else: print("EQUAL")
s050300912
p03738
u767664985
1556515652
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
A, B = eval("int(input()," * 2) if A > B: print("GREATER") elif A < B: print("LESS") else: print("EQUAL")
s272179435
p03738
u575279726
1556392106
Python
Python (3.4.3)
py
Runtime Error
17
2940
132
B = input().split() A = int(B[1]) B = int(B[0]) if A==B: print("EQUAL") elif A>B: print("GREATER") elif A<B: print("LESS")
s031236801
p03738
u802772880
1555984206
Python
Python (3.4.3)
py
Runtime Error
18
2940
103
a,b=map(int,input().split()) ans='LESS' if a>b: ans='GREATER' elif a==b: ans='EQUAL' print(ans)
s357035288
p03738
u782685137
1555569244
Python
Python (3.4.3)
py
Runtime Error
18
2940
80
A,B=map(int,input().split()) print("GREATER"if A>B else"LESS"if A<B else"EQUAL")
s549914251
p03738
u411544692
1554788980
Python
Python (3.4.3)
py
Runtime Error
18
3060
119
A, B = map(int, input().split()) if A==B: ans = 'EQUAL' elif A<B: ans = 'LESS' else: ans = 'GREATER' print(ans)
s066370192
p03738
u798129018
1554435640
Python
Python (3.4.3)
py
Runtime Error
18
3064
293
a,b = input() if len(a) < len(b): print("LESS") exit() elif len(a) > len(b): print("GREATER") exit() else: for i in xrange(len(a)): if a[i] > b[i]: print("GREATER") exit() elif a[i] < b[i]: print("LESS") exit() else: continue print("EQUAL")
s260591536
p03738
u227082700
1553621181
Python
Python (3.4.3)
py
Runtime Error
17
2940
80
a,b=map(int,input().split());print("GREATER"if a>b else"LESS"if a<b else"EQUAL")
s663026856
p03738
u635182517
1553463193
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
A, B = map(int, input().split()) if A > B: ans = 'GREATER' elif A == B: ans = 'EQUAL' else: ans = 'LESS'
s102186455
p03738
u393512980
1553201984
Python
Python (3.4.3)
py
Runtime Error
17
3064
285
a=input() b=input() if len(a)>len(b): print("GREATER") elif len(a)<len(b): print("LESS") else: i=0 while 1: if int(a[i])>int(b[i]): f=1 break elif int(a[i])<int(b[i]): f=2 break i+=1 if f==1: print("GREATER") else: print("LESS")
s483834071
p03738
u393512980
1553201809
Python
Python (3.4.3)
py
Runtime Error
17
2940
260
a=input() b=input() if len(a)>len(b): print("GREATER") elif len(a)<len(b): print("LESS") else: i=0 while 1: if int(a[i])>int(b[i]): f=1 elif int(a[i]<int(b[i]): f=2 i+=1 if f==1: print("GREATER") else: print("LESS")
s684184897
p03738
u807772568
1552440941
Python
Python (3.4.3)
py
Runtime Error
17
3064
544
n,m = map(int,input().split()) a = [list(input()) for i in range(n)] h = [] l = [] co = 0 for i in range(n): co = 0 for j in range(m): if a[i][j] == "#": co = 1 if co == 0: l.append(i) for i in range(m): co = 0 for j in range(n): if a[j][i] == "#": co = 1 if co == 0: h.append(i) for i in range(len(l)): a.pop(l.pop()) for i in range(len(h)): p = h.pop() for j in range(len(a)): a[j].pop(p) for i in range(len(a)): print("".join(a[i]))
s480559051
p03738
u375616706
1552349922
Python
Python (3.4.3)
py
Runtime Error
18
2940
263
#include<stdio.h> int main(void){ int a,b; scanf("%d",&a); scanf("%d",&b); if(a==b){ printf("EQUAL\n"); }else{ if (a>b){ printf("GREATER\n"); } else{ printf("LESS\n"); } } }
s264306234
p03738
u375616706
1552349880
Python
Python (3.4.3)
py
Runtime Error
17
2940
267
#include<stdio.h> int main(void){ int a,b; scanf("%d\n",&a); scanf("%d\n",&b); if(a==b){ printf("EQUAL\n"); }else{ if (a>b){ printf("GREATER\n"); } else{ printf("LESS\n"); } } }
s713815548
p03738
u375616706
1552349815
Python
Python (3.4.3)
py
Runtime Error
17
2940
265
#include<stdio.h> int main(void){ int a,b; scanf("%d\n",&a); scanf("%d\n",&b); if(a==b){ printf("EQUAL\n"); }else{ if (a>b){ print("GREATER\n"); } else{ pritn("LESS\n"); } } }
s371013217
p03738
u864667985
1551421399
Python
Python (3.4.3)
py
Runtime Error
18
2940
100
a,b=input().split() if a > b: print('GREATER') elif a == b: print('EQUAL') else: print('LESS')
s406397436
p03738
u934073187
1551148981
Python
Python (3.4.3)
py
Runtime Error
18
2940
111
a = int(input()) b = int(input()) if a > b: print("GREATER") else if: print("LESS") else: print("EQUAL")
s567450981
p03738
u518064858
1550789923
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
a,b=map(int,input().split()) if a>b: print("GREATER") elif a<b: print("LESS") else: print("EQUAL")
s388350963
p03738
u239981649
1549171584
Python
Python (3.4.3)
py
Runtime Error
37
5204
182
from decimal import Decimal as deci *a, = map(int, input().split()) if deci(a[0]) == deci(a[1]): print("EQUAL") else: print("GREATER" if deci(a[0]) > deci(a[1]) else "LESS")
s432249515
p03738
u239981649
1549171409
Python
Python (3.4.3)
py
Runtime Error
18
2940
122
*a, = map(int, input().split()) if a[0] == a[1]: print("EQUAL") else: print("GREATER" if a[0] > a[1] else "LESS")
s190827739
p03738
u239981649
1549171335
Python
Python (3.4.3)
py
Runtime Error
19
2940
122
*a, = map(int, input().split()) if a[0] == a[1]: print("EQUAL") else: print("GREATER" if a[0] > a[1] else "LESS")
s635586498
p03738
u881037761
1548964652
Python
Python (3.4.3)
py
Runtime Error
18
2940
118
a=input().split() if a[0]>a[1]: print("GREATER\n") elif a[0]==a[1]: print("EQUAL\n") else: print("LESS\n")
s472337265
p03738
u881037761
1548964555
Python
Python (3.4.3)
py
Runtime Error
18
2940
112
a=input().split() if a[0]>a[1]: print("GREATER") elif a[0]==a[1]: print("EQUAL") else: print("LESS")
s412411889
p03738
u620945921
1548544719
Python
Python (3.4.3)
py
Runtime Error
18
3064
302
a=input() b=input() flag=0 if len(b) < len(a): print('GREATER') flag=1 if len(b) > len(a): print('LESS') flag=1 for i in range(len(a)): if b[i] < a[i] and flag==0: print('GREATER') flag=1 elif b[i] > a[i] and flag==0: print('LESS') flag=1 if flag==0: print('EQUAL')
s869582871
p03738
u807772568
1546630569
Python
Python (3.4.3)
py
Runtime Error
18
2940
112
a,b = map(int,input().split()) if a > b: print("GREATER") elif a == b: print("EQUAL") else: print("LESS")
s203023489
p03738
u444856278
1546630238
Python
Python (3.4.3)
py
Runtime Error
17
2940
125
a,b = [int(i) for i in input().split()] if a < b: print("LESS") elif a > b: print("GREATER") else: print("EQUAL")
s643862625
p03738
u996276765
1546129179
Python
Python (3.4.3)
py
Runtime Error
18
3064
387
A = int(input()) B = int(input()) if len(A) > len(B): print('GREATER') elif len(A) < len(B): print('LESS') elif A == B: print('EQUAL') else: a = [int(i) for i in str(A)] b = [int(j) for j in str(B)] for i in range(len(A)): if A[i] > B[i]: print('GREATER') break elif A[i] < B[i]: print('LESS') break
s448038174
p03738
u523986442
1544803768
Python
Python (3.4.3)
py
Runtime Error
17
2940
146
A = input() B = input() AA = f"{A:>101}" BB = f"{B:>101}" if AA == BB: print("EQUAL") elif AA>BB: print("GREATER") else: print("LESS")
s954462829
p03738
u928784113
1544548548
Python
Python (3.4.3)
py
Runtime Error
17
2940
145
# -*- coding: utf-8 -*- A = int(input()) B = int(input()) S = A-B if S > 0: print("GREATER") elif S = 0: print("EQUAL") else: print("LESS")
s388321344
p03738
u654240084
1542152720
Python
Python (3.4.3)
py
Runtime Error
18
2940
107
a=input() b=input() if a > b: printf("GREATER") elif a < b: print("LESS") else: print("EQUAL")
s395149263
p03738
u853900545
1539361589
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
a,b = map(int,input().split()) if a > b: print('GREATER') elif a < b: print('LESS') else: print('EQUAL')
s688883865
p03738
u879870653
1537539413
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
A,B = map(int,input().split()) if A > B : print("GREATER") elif A < B : print("LESS") else : print("EQUAL")
s539740797
p03738
u826263061
1536435237
Python
Python (3.4.3)
py
Runtime Error
17
2940
92
a, b = list(map(int, input().split())) if a > b: print('GREATER') else: print('LESS')
s095647502
p03738
u407535999
1535572778
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
a=input() b=input() if a>b: print("GREATER") elif a=b print("EQUAL") else print("LESS")
s555101382
p03738
u557200646
1535568592
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
a,b = [long(input()) for i in range(2)] if a == b: print("EQUAL") elif a < b: print("LESS") elif a > b: print("GREATER")
s850451319
p03738
u557200646
1535568469
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
a,b = [long(input()) for i in range(2)] if a == b: print("EQUAL") elif a < b: print("LESS") elif a > b: print("GREATER")
s624189887
p03738
u557200646
1535568392
Python
Python (3.4.3)
py
Runtime Error
17
2940
126
a,b = [input() for i in range(2)] if a == b print("EQUAL") elif a < b: print("LESS") elif a > b: print("GREATER")
s223795495
p03738
u557200646
1535568219
Python
Python (3.4.3)
py
Runtime Error
17
2940
126
a,b = [long(input()) for i in range(2)] if a > b: print("GREATER") elif a < b: print("LESS") else: print("EQUAL")
s502392628
p03738
u407730443
1532631243
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
a = int(input()) b = int(input()) if a>b: print("GREATER") elif a<b: print("LESS") else: prin("EQUAL")
s348188110
p03738
u612721349
1532133235
Python
Python (3.4.3)
py
Runtime Error
17
2940
72
p=input;a=int(p())-int(p());print(['EQUAL','LESS'][a<0],'GREATER'][a>0])
s602121875
p03738
u451017206
1530930003
Python
Python (3.4.3)
py
Runtime Error
17
2940
102
a,b=map(int, input().split()) if a > b: print('GREATER') elif a < b:print('LESS') else: print('EQUAL')
s188340362
p03738
u451017206
1530929962
Python
Python (3.4.3)
py
Runtime Error
17
2940
103
a,b=map(int, input().split()) if a > b: print('GREATER') elif: a < b:print('LESS') else: print('EQUAL')
s635296628
p03738
u319410662
1530888788
Python
Python (2.7.6)
py
Runtime Error
10
2568
93
A, B = map(int, raw_input().split()) print "GREATER" if A>B else ("LESS" if A<B else "EQUAL")
s600377180
p03738
u497625442
1530842926
Python
Python (3.4.3)
py
Runtime Error
17
3064
118
A = int(input()) B = int(input()) if A > B: print("GREATER") elif A = B: print("EQUAL") else A < B: print("LESS")
s232821555
p03738
u095969144
1530366140
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
a,b = map(int, input().split()) if a > b : print("GREATER") esle: print("LESS")
s915642831
p03738
u858136677
1529983960
Python
Python (3.4.3)
py
Runtime Error
18
3188
107
a,b = map(int,input().split()) if a > b: print('GREATER') elif a < b: print('LESS') else: print('EQUAL')
s989382780
p03738
u281303342
1528767843
Python
Python (3.4.3)
py
Runtime Error
17
2940
113
A,B = map(int,input().split()) if A==B: print("EQUAL") elif A>B: print("GREATER") else: print("LESS")
s212618666
p03738
u118019047
1525304451
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
a,b = map(int,input().split()) if a > b: print("GREATER") elif a < b: print("LESS") else: print("EQUAL")
s824022304
p03738
u952708174
1517887264
Python
Python (3.4.3)
py
Runtime Error
31
3444
115
A,B = [int(i) for i in input().split()] if A>B: print('GREATER') elif A<B: print('LESS') else: print('EQUAL')
s653053907
p03738
u586577600
1515885180
Python
Python (3.4.3)
py
Runtime Error
17
3060
123
ab = [int(input()) for _ in range(2)] if a[0] > a[1]: print('GREATER') elif a[0] < a[1]: print('LESS') else: print('EQUAL')
s009279642
p03738
u257974487
1513556288
Python
Python (3.4.3)
py
Runtime Error
17
2940
114
A = int(input()) B = int(input()) if A > B: print("GREATER") eiif A == B: print("EQUAL") else: print("LESS")
s151153085
p03738
u136090046
1511730336
Python
Python (3.4.3)
py
Runtime Error
17
2940
273
/Users/miyauchitoru/Python_Competitive-programming/bin/python "/Users/miyauchitoru/PycharmProjects/Competitive_Programming/AtCorder/AtCoder Beginner Contest 077/compe.py" 123456789012345678901234567890 234567890123456789012345678901 LESS Process finished with exit code 0
s496491032
p03738
u190405389
1506807422
Python
Python (3.4.3)
py
Runtime Error
18
2940
88
a, b = map(int, input().split()) print('GREATER' if a>b else 'LESS' if a<b else 'EQUAL')
s759897055
p03738
u665415433
1506088862
Python
Python (3.4.3)
py
Runtime Error
18
3064
120
a,b=[int(i) for i in input().split()] if a>b: print('GREATER') elif a<b: print('LESS') else: print('EQUAL')
s355790745
p03738
u665415433
1506088827
Python
Python (3.4.3)
py
Runtime Error
17
2940
120
a,b=[int(i) for i in input().split()] if a>b: print('GREATER') elif a<b: print('LESS') else: print('EQUAL')
s929587249
p03738
u150117535
1504580899
Python
PyPy3 (2.4.0)
py
Runtime Error
160
38384
153
num=[] for i in [0]*2: num.append(int(input())) if num[0]>num[1]: print("GREATER") elif num[0]=num[1]: print("EQUAL") else: print("LESS")
s431890233
p03738
u243370518
1503615689
Python
Python (3.4.3)
py
Runtime Error
17
2940
139
x = input().split(" ") a = int(x[0]) b = int(x[1]) if (a>b): print("GREATER") elif(a==b): print("EQUAL") else: print("LESS")
s054537421
p03738
u078200872
1498511550
Python
Python (3.4.3)
py
Runtime Error
17
2940
108
A = int(input()) B = int(input()) if A == B: print "EQUAL" elif A < B: print "LESS" else: print "GREATER"
s462438725
p03738
u078200872
1498511512
Python
Python (3.4.3)
py
Runtime Error
17
2940
108
A = int(input()) B = int(input()) if A == B: print "EQUAL" elif A < B: print "LESS" else: print "GREATER"
s631734161
p03738
u078200872
1498511444
Python
Python (3.4.3)
py
Runtime Error
17
2940
108
A = int(input()) B = int(input()) if A == B: print "GREATER" elif A < B: print "LESS" else: print "EQUAL"
s136493725
p03738
u203414902
1495904059
Python
Python (3.4.3)
py
Runtime Error
18
3188
111
a,b=map(int,input().split()) if a>b: print("GREATER") elif a<b: print("LESS") else: print("EQUAL")
s771259585
p03738
u203414902
1495903995
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
a,b=map(int,input().split()) if a>b: print("GREATER") elif a<b: print("EQUAL") else: print("LESS")
s743894382
p03738
u552668967
1495650050
Python
Python (2.7.6)
py
Runtime Error
10
2568
150
from sys import stdin a = int(stdin.readline()) b = int(stdin.readline()) ans = 'GREATER' if a < b: ans = 'LESS' elilf a==b: ans = 'EQUAL' print ans
s580555145
p03738
u652737716
1495226505
Python
Python (3.4.3)
py
Runtime Error
18
3060
152
inputs = [int(x) for x in input().split(" ")] A = inputs[0] B = inputs[1] if A > B: print("GREATER") elif A < B: print("LESS") else: print("EQUAL")
s324126994
p03738
u426713196
1494514259
Python
Python (2.7.6)
py
Runtime Error
11
2568
153
# -*- coding: utf-8 -*- s1 = int(raw_input()) s2 = int(raw_input()) if s1>s2: print "GREATER" elif s1 == s2: print "EQUAL" else: print "LESS
s397640768
p03738
u426713196
1494514150
Python
Python (2.7.6)
py
Runtime Error
10
2568
132
s1 = int(raw_input()) s2 = int(raw_input()) if s1>s2: print "GREATER" if s1 == s2: print "EQUAL" if s1 < s2: print "LESS
s882552608
p03738
u426713196
1494514075
Python
Python (2.7.6)
py
Runtime Error
11
2568
128
s1 = int(raw_input()) s2 = int(raw_input()) if s1>s2: print "GREATER" elif s1 == s2: print "EQUAL" else: print "LESS
s327360371
p03738
u819300485
1494477041
Python
Python (3.4.3)
py
Runtime Error
17
2940
84
a,b = map(int,input().split()) if a > b: print("GREATER") else : print("LESS")
s856368264
p03738
u970315942
1494384451
Python
Python (2.7.6)
py
Runtime Error
10
2568
107
a, b = input(), input() if a>b: print 'GREATER' else if a<b: print 'LESS' else: print 'EQUAL'
s912872593
p03738
u768816323
1493895401
Python
Python (3.4.3)
py
Runtime Error
17
3064
398
a=list(input()) b=list(input()) for i in range(len(a)): a[i]=int(a[i]) i=i+1 for i in range(len(b)): b[i]=int(b[i]) i=i+1 if len(a)==len(b): i=0 while a[i]==b[i] and i<len(a): i=i+1 if i==len(a)-1: print("EQUAL") elif a[i]>b[i]: print("GREATER") else: print("LESS") elif len(a)>len(b): print("GREATER") else: print("LESS")
s926444925
p03738
u768816323
1493585525
Python
Python (3.4.3)
py
Runtime Error
17
3064
378
a=list(input()) b=list(input()) for i in range(len(a)): a[i]=int(a[i]) for i in range(len(b)): b[i]=int(b[i]) if len(a)==len(b): i=0 while a[i]==b[i] and i<len(a): i=i+1 if i==len(a)-1: print("EQUAL") elif a[i]>b[i]: print("GREATER") else: print("LESS") elif len(a)>len(b): print("GREATER") else: print("LESS")
s548763238
p03738
u768816323
1493585451
Python
Python (3.4.3)
py
Runtime Error
17
3064
376
a=list(input()) b=list(input()) for i in range(len(a)): a[i]=int(a[i]) for i in range(len(b)): b[i]=int(b[i]) if len(a)==len(b): i=0 while a[i]==b[i] and i<len(a): i=i+1 if i==len(a): print("EQUAL") elif a[i]>b[i]: print("GREATER") else: print("LESS") elif len(a)>len(b): print("GREATER") else: print("LESS")
s681943838
p03738
u768816323
1493585177
Python
Python (3.4.3)
py
Runtime Error
17
3064
363
a=list(input()) b=list(input()) for i in range(len(a)): a[i]=int(a[i]) for i in range(len(b)): b[i]=int(b[i]) if len(a)==len(b): i=0 while a[i]==b[i]: i=i+1 if i==len(a): print("EQUAL") elif a[i]>b[i]: print("GREATER") else: print("LESS") elif len(a)>len(b): print("GREATER") else: print("LESS")
s446166640
p03738
u768816323
1493584944
Python
Python (3.4.3)
py
Runtime Error
17
3064
363
a=list(input()) b=list(input()) for i in range(len(a)): a[i]=int(a[i]) for i in range(len(b)): b[i]=int(b[i]) if len(a)==len(b): i=0 while a[i]==b[i]: i=i+1 if i==len(a): print("EQUAL") if a[i]>b[i]: print("GREATER") else: print("LESS") elif len(a)>len(b): print("GREATER") else: print("LESS")
s798059811
p03738
u021406692
1493250571
Python
Python (2.7.6)
py
Runtime Error
333
311896
1129
# -*- coding:utf-8 -*- n = int(raw_input()) numlist = (raw_input()).split(' ') count = 0 i = 0 while (int(numlist[i]) == 0): i += 1 if (int(numlist[0]) == 0): if (int(numlist[i]) > 0): numlist[0] = (-1) ** i else: numlist[0] = (-1) ** (i+1) count += 1 sumlist = [int(numlist[0])] for i in range(1, n): sumlist.append(sumlist[i-1] + int(numlist[i])) while (True): if (sumlist[i-1] > 0 and sumlist[i] > 0): #i-1,i番目までのsumがともに正 numlist[i] = int(numlist[i]) - (sumlist[i] + 1) count += sumlist[i] + 1 sumlist[i] = -1 elif (sumlist[i-1] < 0 and sumlist[i] < 0): #i-1,i番目までのsumがともに負 numlist[i] = int(numlist[i]) + ((-1)*sumlist[i] + 1) count += (-1)*sumlist[i] + 1 sumlist[i] = 1 elif (sumlist[i] == 0): #i番目までのsum=0 if (sumlist[i-1] > 0): numlist[i] = int(numlist[i]) - 1 sumlist[i] -= 1 if (sumlist[i-1] < 0): numlist[i] = int(numlist[i]) + 1 sumlist[i] += 1 count += 1 else: break #print numlist #print sumlist print count
s966703873
p03738
u981890679
1493248014
Python
Python (3.4.3)
py
Runtime Error
17
2940
150
import math import sys x,y=[int(i) for i in input().split()] if x == y: print("EQUAL") elif x > y: print("GREATER") else: print("LESS")
s931336316
p03738
u981890679
1493247913
Python
Python (3.4.3)
py
Runtime Error
18
2940
150
import math import sys x,y=[int(i) for i in input().split()] if x > y: print("GREATER") elif x == y: print("EQUAL") else: print("LESS")
s758824366
p03738
u588870008
1493146457
Python
Python (2.7.6)
py
Runtime Error
10
2568
107
a = input() b = input() if a > b: print "GREATER elif a < b: print "LESS" else: print "EQUAL"
s308451074
p03738
u579170193
1493072804
Python
Python (3.4.3)
py
Runtime Error
17
2940
67
a=input();b=input();print a<b and'LESS'or a>b and'GREATER'or'EQUAL'
s545829238
p03738
u579170193
1493071940
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
a=(int)(input()-input());print(a>0 and'GREATER'or a<0 and'LESS'or'EQUAL')
s663498438
p03738
u579170193
1493071905
Python
Python (3.4.3)
py
Runtime Error
17
2940
71
a=int(input()-input());print(a>0 and'GREATER'or a<0 and'LESS'or'EQUAL')
s514735623
p03738
u579170193
1493071821
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
a=input()-input();print(a>0 and'GREATER'or a<0 and'LESS'or'EQUAL')
s178750580
p03738
u021406692
1493047247
Python
Python (2.7.6)
py
Runtime Error
11
2696
178
# -*- coding:utf-8 -*- sA = raw_input() sB = raw_input() A = int(sA) B = int(sB) if (A > B): print 'GREATER' elif (A < B): print 'LESS' else: print 'EQUAL' ~
s154350503
p03738
u461592867
1493002842
Python
Python (3.4.3)
py
Runtime Error
18
3060
154
# -*- coding: utf-8 -*- A = map(int, input()) B = map(int, input()) if A > B: print('GREATER') elif A < B: print('LESS') else: print('EQUAL')
s921577393
p03738
u010004797
1492954617
Python
Python (3.4.3)
py
Runtime Error
17
2940
96
a=int(input()) b=int(input()) if a>b:print("GREATER") elif a<b:print("LESS") else print("EQUAL")
s023075695
p03738
u849290552
1492914351
Python
Python (3.4.3)
py
Runtime Error
17
2940
113
A,B = map(int, input().split()) if A>B: print('GREATER') elif A<B: print('LESS') else: print('EQUAL')
s627482388
p03738
u758661720
1492913935
Python
Python (2.7.6)
py
Runtime Error
10
2568
110
[a,b] = [int(i) for i in raw_input().split()] if(a>b):print 'GREATER' elif(a==b):print'EQUAL' else:print'LESS'
s324247968
p03738
u638057737
1492910222
Python
Python (3.4.3)
py
Runtime Error
17
3060
249
A = input() B = input() if len(A) > len(B): print("GREATER") elif len(A) < len(B): print("LESS") else: i = 0 while A[i] == B[i]: i += 1 if int(A[i]) > int(B[i]): print("GREATER") else: print("LESS")
s600218550
p03738
u009102496
1492909715
Python
Python (3.4.3)
py
Runtime Error
22
3316
110
a=int(input()) b=int(input()) if a>b: print("GREATER") elif a<b: print("LESS") else: print(EQUAL)
s161515881
p03738
u768951609
1492909692
Python
Python (2.7.6)
py
Runtime Error
11
2696
113
a=int(raw_input) b=int(raw_input) if a>b: print "GREATER" elif a<b: print "LESS" else: print "EQUAL"
s863088246
p03739
u225388820
1600193629
Python
PyPy3 (7.3.0)
py
Runtime Error
106
87116
449
def f(): for i in a[1:]: if c > 0: if c + i >= 0: cost += c + i + 1 c = -1 else: c += i else: if c + i <= 0: cost += 1 - c - i c = 1 else: c += i n = int(input()) a = list(map(int, input().split())) cost = (a[0] == 0) c = a[0] + (a[0] == 0) f() tmp = cost cost = 0 if a[0] >= 0: cost = a[0] + 1 c = -1 else: cost = -a[0] + 1 c = 1 f() print(min(cost, tmp))
s502332381
p03739
u074220993
1599423399
Python
Python (3.8.2)
py
Runtime Error
145
20012
423
N = int(input()) A = list(map(int, input().split())) Cost = lambda a, Sum:0 if (Sum > 0) ^ (Sum + a > 0) else abs(Sum + a) + 1 Sum = lambda a, preSum:preSum+a if (preSum > 0) ^ (preSum + a > 0) else -preSum//abs(preSum) pSum = Sum(A[0],0) nSum = Sum(A[0],0) pCost = 0 nCost = 0 for a in A[1:]: pCost += Cost(a, pSum) pSum = Sum(a, pSum) nCost += Cost(a, nSum) nSum = Sum(a, nSum) print(min(pCost, nCost))
s851346423
p03739
u074220993
1599423232
Python
Python (3.8.2)
py
Runtime Error
69
20000
420
N = int(input()) A = list(map(int, input().split())) Cost = lambda a, Sum:0 if (Sum > 0) ^ (Sum + a > 0) else abs(Sum + a) + 1 Sum = lambda a, preSum:preSum+a if (Sum > 0) ^ (preSum + a > 0) else -preSum//abs(preSum) pSum = Sum(A[0],0) nSum = Sum(A[0],0) pCost = 0 nCost = 0 for a in A[1:]: pCost += Cost(a, pSum) pSum = Sum(a, pSum) nCost += Cost(a, nSum) nSum = Sum(a, nSum) print(min(pCost, nCost))
s645875214
p03739
u044220565
1598551416
Python
Python (3.8.2)
py
Runtime Error
168
36544
1000
# coding: utf-8 import sys #from operator import itemgetter sysread = sys.stdin.buffer.readline read = sys.stdin.buffer.read #from heapq import heappop, heappush #from collections import defaultdict sys.setrecursionlimit(10**7) #import math #from itertools import product, accumulate, combinations, product #import bisect import numpy as np #from copy import deepcopy #from collections import deque #from decimal import Decimal #from numba import jit INF = 1 << 50 EPS = 1e-8 def run(): n, *A = map(int, read().split()) v = 0 acum = [] for a in A: v += a acum.append(v) # greedy cums = 0 count = 0 V = A[0] // abs(A[0]) for a in acum[1:]: #print(a, '---------') V *= -1 if (a + cums) * V > 0: continue else: update = abs(a + cums) + 1 cums += (update) * V count += update #print(V, cums, count) print(count) if __name__ == "__main__": run()
s363427483
p03739
u074220993
1597759172
Python
Python (3.8.2)
py
Runtime Error
53
20032
731
n = int(input()) a = [int(x) for x in input().split()] def odd_positive(List, n): sum_a = 0 cost = 0 for a in List: nextsum = sum_a + a if i & 1 and nextsum <= 0: cost = - nextsum + 1 sum_a = 1 elif (not i & 1) and nextsum >= 0: cost = nextsum + 1 sum_a = -1 return cost def odd_negative(List, n): sum_a = 0 cost = 0 for a in List: nextsum = sum_a + a if i & 1 and nextsum >= 0: cost = nextsum + 1 sum_a = -1 elif (not i & 1) and nextsum <= 0: cost = - nextsum + 1 sum_a = 1 return cost ans = min(odd_positive(a,n), odd_negative(a,n)) print(ans)
s773842597
p03739
u107915058
1597717778
Python
Python (3.8.2)
py
Runtime Error
21
9068
644
def chk(a,t): # t=True(奇数項が正), t=False(偶数項が正) cnt=0 # 操作回数 x=0 # 塁積和 for i in a: x+=i if t==True and x<=0: # 正項予定なのに累積が負か0 cnt+=1-x x=x+(1-x) # 今回のcntで符号変更 elif t==False and x>=0: # 負項予定なのに累積が正か0 cnt+=1+x x=x-(1+x) # 今回のcntで符号変換 t = not t # 次の項は符号が逆 return cnt print(min(chk(a,True),chk(a,False)))
s684600275
p03739
u481250941
1597600054
Python
Python (3.8.2)
py
Runtime Error
117
27548
1286
# # abc059 c # import sys from io import StringIO import unittest class TestClass(unittest.TestCase): def assertIO(self, input, output): stdout, stdin = sys.stdout, sys.stdin sys.stdout, sys.stdin = StringIO(), StringIO(input) resolve() sys.stdout.seek(0) out = sys.stdout.read()[:-1] sys.stdout, sys.stdin = stdout, stdin self.assertEqual(out, output) def test_入力例_1(self): input = """4 1 -3 1 0""" output = """4""" self.assertIO(input, output) def test_入力例_2(self): input = """5 3 -6 4 -5 7""" output = """0""" self.assertIO(input, output) def test_入力例_3(self): input = """6 -1 4 3 2 -5 4""" output = """8""" self.assertIO(input, output) def resolve(): N = int(input()) A = list(map(int, input().split())) ans = 0 s = A[0] f = A[0] // abs(A[0]) for i in range(1, N): a = A[i] if f == 1 and s+a >= 0: ans += abs(s+a) + 1 s = -1 elif f == -1 and s+a <= 0: ans += abs(s+a) + 1 s = 1 else: s += a f = s // abs(s) print(ans) if __name__ == "__main__": # unittest.main() resolve()
s881791924
p03739
u481250941
1597598242
Python
Python (3.8.2)
py
Runtime Error
118
27632
1240
# # abc059 c # import sys from io import StringIO import unittest class TestClass(unittest.TestCase): def assertIO(self, input, output): stdout, stdin = sys.stdout, sys.stdin sys.stdout, sys.stdin = StringIO(), StringIO(input) resolve() sys.stdout.seek(0) out = sys.stdout.read()[:-1] sys.stdout, sys.stdin = stdout, stdin self.assertEqual(out, output) def test_入力例_1(self): input = """4 1 -3 1 0""" output = """4""" self.assertIO(input, output) def test_入力例_2(self): input = """5 3 -6 4 -5 7""" output = """0""" self.assertIO(input, output) def test_入力例_3(self): input = """6 -1 4 3 2 -5 4""" output = """8""" self.assertIO(input, output) def resolve(): N = int(input()) A = list(map(int, input().split())) ans = 0 s = 0 f = 0 for a in A: if f == 1 and s+a >= 0: ans += abs(s+a) + 1 s = -1 elif f == -1 and s+a <= 0: ans += abs(s+a) + 1 s = 1 else: s += a f = s // abs(s) print(ans) if __name__ == "__main__": # unittest.main() resolve()