s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s898669044 | p02258 | u626266743 | 1508856002 | Python | Python3 | py | Runtime Error | 0 | 0 | 176 | n = input()
a = input()
Max = -10000000
Min = a
for i in range(n):
x = int(input())
if (Max < (x-Min)):
Max = x-Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpuyoz0phz/tmp17m6p99k.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s157597349 | p02258 | u626266743 | 1508856016 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | n = int(input())
a = int(input())
Max = -10000000
Min = a
for i in range(n):
x = int(input())
if (Max < (x-Min)):
Max = x-Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpocn9l4q7/tmp7iy1x5f1.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s015828566 | p02258 | u626266743 | 1508896395 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | n = int(input())
a = int(input())
Max = -999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if ( x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpzyb0sif2/tmpgitfpkgm.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s467040061 | p02258 | u626266743 | 1508896490 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | n = int(input())
a = int(input())
Max = -999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmp5o_6nr0t/tmp1z4bgl4v.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s503086139 | p02258 | u626266743 | 1508896590 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | n = int(input())
a = int(input())
Max = -999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpt27e9dxo/tmphutxcyhk.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s664323651 | p02258 | u626266743 | 1508896705 | Python | Python3 | py | Runtime Error | 0 | 0 | 188 | n = int(input())
a = int(input())
Max = -999999
Min = a
for i in range(n):
x = int(input())
if (Max < (x - Min)):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpf4w29aj5/tmp5bo1wkl6.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s406536425 | p02258 | u626266743 | 1508896825 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | n = int(input())
a = int(input())
Max = -9999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpra4w6s_k/tmphv080ex8.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s936120998 | p02258 | u626266743 | 1508899571 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | n = int(input())
a = int(input())
Max = -9999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpqvhshfk_/tmpeghnshht.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s076604941 | p02258 | u626266743 | 1508900180 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | n = int(input())
a = int(input())
Max = -200000
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpk1rtrsfc/tmp7nl8d02g.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s701826027 | p02258 | u626266743 | 1508900237 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | n = int(input())
a = int(input())
Max = -999999
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpajoib17j/tmpmdxi05o1.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s039326657 | p02258 | u626266743 | 1508900326 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | n = int(input())
a = int(input())
Max = -10 ** 9
Min = a
for i in range(n):
x = int(input())
if (Max < x - Min):
Max = x - Min
if (x < Min):
Min = x
print(Max) | Traceback (most recent call last):
File "/tmp/tmpnac_mtnd/tmptgmt7jfb.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s329708023 | p02258 | u933096856 | 1510404338 | Python | Python3 | py | Runtime Error | 20 | 7724 | 229 | n=int(input())
r=[]
for i in range(n):
r.append(int(input()))
#m=sorted(r, reverse=True)
p=max(r[1:])
q=min(r[:r.index(p)])
a=p-q
q=min(r[:len(r)-1])
#print(q)
p=max(r[r.index(q)+1:])
#print(p)
b=p-q
#print(b)
print(max(a,b)) | Traceback (most recent call last):
File "/tmp/tmpvirqph62/tmpen8hf1y6.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s214250778 | p02258 | u409699893 | 1511007879 | Python | Python3 | py | Runtime Error | 0 | 0 | 155 | n = int(input())
min_n = 0
max_n = -2 * 10**9
for i in range(n):
x = int(input())
min_n = min(x,min_n)
max_n = max(max_n,x - min_n)
print max_n | File "/tmp/tmp3e6w044h/tmpfwf9n1vb.py", line 8
print max_n
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s879689916 | p02258 | u747709646 | 1511526812 | Python | Python3 | py | Runtime Error | 0 | 0 | 248 | import math
n = int(input())
nums = [int(input()) for i in range(n)]
minNum = nums[0]
maxDiff = -math.inf
for i in nums[1:]:
diff = i - minNum
if diff > maxDiff:
maxDiff = diff
if minNum > i:
minNum = i
print(maxDiff) | Traceback (most recent call last):
File "/tmp/tmp0sd3dyn4/tmp7y_c75f9.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s480489419 | p02258 | u747709646 | 1511526964 | Python | Python3 | py | Runtime Error | 0 | 0 | 248 | import math
n = int(input())
nums = [int(input()) for i in range(n)]
minNum = nums[0]
maxDiff = -math.inf
for i in nums[1:]:
diff = i - minNum
if diff > maxDiff:
maxDiff = diff
if minNum > i:
minNum = i
print(maxDiff) | Traceback (most recent call last):
File "/tmp/tmpd2yyotag/tmpob54foiu.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s180294377 | p02258 | u424041287 | 1512117833 | Python | Python3 | py | Runtime Error | 0 | 0 | 159 | t = []
n = int(input())
for i in range(n):
t.append(int(input()))
for j range(1,n):
for i range(j):
maxv = max([maxv,t[j] - t[i]])
print(maxv) | File "/tmp/tmp7qkub5zk/tmpdoyscwm5.py", line 6
for j range(1,n):
^^^^^
SyntaxError: invalid syntax
| |
s324177035 | p02258 | u424041287 | 1512117875 | Python | Python3 | py | Runtime Error | 0 | 0 | 165 | t = []
n = int(input())
for i in range(n):
t.append(int(input()))
for j in range(1,n):
for i in range(j):
maxv = max([maxv,t[j] - t[i]])
print(maxv) | Traceback (most recent call last):
File "/tmp/tmps70exwt2/tmpqo69i_ke.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s547933661 | p02258 | u424041287 | 1512118414 | Python | Python3 | py | Runtime Error | 0 | 0 | 230 | t = []
n = int(input())
for i in range(n):
t.append(int(input()))
'''
n = 6
t=[4,1,5,7,5,4]
'''
minv = t[0]
maxv = t[1] - t[0]
for j in range(1,n):
maxv = max([maxv,t[j] - minv])
minv = min([minv,t[j])
print(maxv) | File "/tmp/tmpcw15r4l1/tmp3g8aew46.py", line 18
minv = min([minv,t[j])
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s517599781 | p02258 | u150984829 | 1513691761 | Python | Python3 | py | Runtime Error | 0 | 0 | 109 | import sys
n=int(input())
r=list(map(int,sys.stdin.read())
print(max([max(r[i+1:])-r[i]for i in range(n-1)])) | File "/tmp/tmpoozy_7e8/tmpdt9guzna.py", line 3
r=list(map(int,sys.stdin.read())
^
SyntaxError: '(' was never closed
| |
s010224947 | p02258 | u150984829 | 1513692305 | Python | Python3 | py | Runtime Error | 0 | 0 | 121 | n=int(input())
r=[int(input())for _ in range(n)]
print(max([max(r[i+1:])-r[i]for i in range(min(r.remove(min(r))),n-1)])) | Traceback (most recent call last):
File "/tmp/tmpc9tcsz5p/tmpkjb1u0_n.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s759245481 | p02258 | u036309564 | 1514476890 | Python | Python3 | py | Runtime Error | 0 | 0 | 263 | import sys
n = int(input())
r0 = int(input())
r1 = int(input())
max = r1 - r0
min = min(r1, r0)
for i in map(int, sys.stdin.readlines(())):
if max < i - min:
max = i - min
if 0 > i - min:
min = i
elif min > i:
min = 1 | Traceback (most recent call last):
File "/tmp/tmp0adib5vi/tmpir2rt_ch.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s582846506 | p02258 | u036309564 | 1514476907 | Python | Python | py | Runtime Error | 0 | 0 | 263 | import sys
n = int(input())
r0 = int(input())
r1 = int(input())
max = r1 - r0
min = min(r1, r0)
for i in map(int, sys.stdin.readlines(())):
if max < i - min:
max = i - min
if 0 > i - min:
min = i
elif min > i:
min = 1 | Traceback (most recent call last):
File "/tmp/tmpr02t7966/tmpo_v4ikv4.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s046073289 | p02258 | u972731768 | 1514611045 | Python | Python3 | py | Runtime Error | 0 | 0 | 179 | i=input
r=range
N=int(i())
A=(int(i()) for _ in r(N))
mp=A[1]-A[0]
mn=A[0]
for a in r(1,N):
x=A[a]
b=x-mn
if mp<(b):mp=b
if 0>b:mn=x
if x<mn:mn=x
print(mp) | File "/tmp/tmpf6wn97mf/tmpqonmnevw.py", line 11
if 0>b:mn=x
IndentationError: unexpected indent
| |
s587244810 | p02258 | u841567836 | 1515212053 | Python | Python3 | py | Runtime Error | 0 | 0 | 241 | if __name__ == '__main__':
n = int(input())
M = None
R = int(input())
S = 0
tr = R
for i in range(n - 1):
a = int(input())
if tr - a >= 0:
continue
else:
M = tr - a if M is None and M < tr - a else M
tr = a
print(M)
| Traceback (most recent call last):
File "/tmp/tmppabimxi3/tmpu1jy47ch.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s175375201 | p02258 | u841567836 | 1515215070 | Python | Python3 | py | Runtime Error | 0 | 0 | 313 | if __name__ == '__main__':
n = int(input())
M = int(input())
m = M
M_c = 0
m_c = 0
m_2 = 0
for i in range(n - 1):
count += 1
a = int(input())
if M <= a:
M = a
M_c = count
elif m >= a:
m, m_2 = a, m
m_c = count if m > a else m_c
if m_c < M_c:
print(M - m)
else:
print(m_2 - m)
| Traceback (most recent call last):
File "/tmp/tmpwjzupb86/tmpdb9bympn.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s561504799 | p02258 | u662418022 | 1515917273 | Python | Python3 | py | Runtime Error | 0 | 0 | 482 | # -*- coding: utf-8 -*-
def maximum_profit_1(n, R):
maxv = R[1] - R[0]
for j in range(1, n):
for i in range(j):
maxv = max(maxv, R[j]-R[i])
return maxv
def maximum_profit_2(n, R):
minv = R[0]
for j in range(1, N):
maxv = max(maxv, R[j]-minv)
minv = min(minv, R[j])
return maxv
if __name__ == '__main__':
n = int(input())
R = [ int(input()) for i in range(n)]
ans = maximum_profit_2(n ,R)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpxh3kifcn/tmpk223i0dz.py", line 21, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s958363597 | p02258 | u150984829 | 1516461968 | Python | Python3 | py | Runtime Error | 0 | 0 | 93 | b,s=-1e7,1e7
for _ in range(int(input())):
r=int(input())
b,s=max(b,c-s),min(s,c)
print(b)
| Traceback (most recent call last):
File "/tmp/tmphdxg4rea/tmpz_jgu5mz.py", line 2, in <module>
for _ in range(int(input())):
^^^^^^^
EOFError: EOF when reading a line
| |
s679478326 | p02258 | u227984374 | 1516602620 | Python | Python3 | py | Runtime Error | 0 | 0 | 245 | N = input()
R = list(map(int, input().split()))
answer = R[1] - R[0]
i = 0
while i < len(R) :
k = i + 1
while k < len(R) :
if R[k] - R[i] > answer :
answer = R[k] -R[i]
k = k + 1
i = i + 1
print(answer)
| Traceback (most recent call last):
File "/tmp/tmpzluv44ff/tmpam_k7bzp.py", line 1, in <module>
N = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s358740140 | p02258 | u779137493 | 1516880072 | Python | Python3 | py | Runtime Error | 0 | 0 | 243 | n = int(input())
before = int(input())
current = int(input())
diffMax = current - before
for i in range(n - 1):
number = int(input())
diff = number - current
diffMax = max(diff, diffMax)
current = min(current, number)
print(diffMax)
| Traceback (most recent call last):
File "/tmp/tmpv8295itp/tmpqvzde_gu.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s382837667 | p02258 | u117140447 | 1516978047 | Python | Python3 | py | Runtime Error | 0 | 0 | 280 | numbers = []
for line in sys.stdin:
numbers.append(int(line))
answer = numbers[2] - numbers[1]
count = 1
while count < len(numbers) - 1:
target = max(numbers[count : ])
if target - numbers[count] > answer :
answer = target - numbers[count]
count += count
print(answer)
| Traceback (most recent call last):
File "/tmp/tmpztx1krjv/tmptqnhkmog.py", line 2, in <module>
for line in sys.stdin:
^^^
NameError: name 'sys' is not defined
| |
s804193002 | p02258 | u770698847 | 1517647127 | Python | Python | py | Runtime Error | 0 | 0 | 592 | # coding: UTF-8
n = int(raw_input())
value_list = []
diff_indx1 = 0
diff_indx2 = 0
value_list.append(int(raw_input()))
if i == 1:
diff = value_list[1] - value_list[0]
diff_indx1 = 1
if value_list[i] >= value_list[diff_indx1]:
for j in range(i):
diff2 = value_list[i] - value_list[j]
if diff <= diff2:
diff = diff2
diff_indx1 = i
diff_indx2 = j
#print("{}:{} - {} = {}").format(diff_indx1,value_list[i],value_list[j],diff)
elif value_list[diff_indx2] > value_list[i]:
diff_indx2 = i
diff_indx1 = i
print diff
| File "/tmp/tmpu12yarjb/tmpi593i_sn.py", line 21
print diff
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s880361449 | p02258 | u547838013 | 1517656935 | Python | Python | py | Runtime Error | 0 | 0 | 211 | n = int(raw_input())
gain = -999999999
max = 1000000000
for i in n:
new = int(raw_input())
if max < new:
if gain < max - new:
gain = max - new
else:
max = new
print diff
| File "/tmp/tmpp33go6ws/tmp13gi00m2.py", line 11
print diff
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s464916408 | p02258 | u547838013 | 1517656972 | Python | Python | py | Runtime Error | 0 | 0 | 211 | n = int(raw_input())
gain = -999999999
max = 1000000000
for i in n:
new = int(raw_input())
if max < new:
if gain < max - new:
gain = max - new
else:
max = new
print gain
| File "/tmp/tmpl3thpk5m/tmpf4c83ofb.py", line 11
print gain
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s828651431 | p02258 | u233629476 | 1517659476 | Python | Python3 | py | Runtime Error | 0 | 0 | 168 | n = int(input())
min_r, max_d = int(input()), - 10**9
for in range(n - 1):
r = int(input())
max_d = max(max_d, r - min)
min_r = min(min_r, r)
print(max_d)
| File "/tmp/tmpxrfwbbbo/tmpwc5f74rr.py", line 3
for in range(n - 1):
^^
SyntaxError: invalid syntax
| |
s109193511 | p02258 | u233629476 | 1517659515 | Python | Python3 | py | Runtime Error | 0 | 0 | 170 | n = int(input())
min_r, max_d = int(input()), - 10**9
for _ in range(n - 1):
r = int(input())
max_d = max(max_d, r - min)
min_r = min(min_r, r)
print(max_d)
| Traceback (most recent call last):
File "/tmp/tmpzvwknedz/tmp28n807or.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s879024342 | p02258 | u770698847 | 1517661978 | Python | Python | py | Runtime Error | 0 | 0 | 675 | # coding: UTF-8
n = int(raw_input())
value_list = []
diff_indx1 = 0
diff_indx2 = 0
diff = None #変数の初期化
for i in range(n):
value_list.append(int(raw_input()))
if i == 1:# diffの初期化
diff = value_list[1] - value_list[0]
diff_indx1 = 1
if value_list[i] >= value_list[diff_indx1]:#引かれる数の更新
diff2 = value_list[i] - value_list[diff_indx2]
if diff <= diff2:
diff = diff2
diff_indx2 = diff_indx1
diff_indx1 = i
if value_list[diff_indx2] > value_list[i]:#引く数の更新と引かれる数のリセット
diff_indx2 = i
diff_indx1 = i
print diff
| File "/tmp/tmpguujrik2/tmpte24sajn.py", line 6
diff = None #変数の初期化
^
SyntaxError: invalid non-printable character U+3000
| |
s357523921 | p02258 | u114628916 | 1517669638 | Python | Python3 | py | Runtime Error | 0 | 0 | 536 | from sys import stdin
N,*datas = [int(i) for i in stdin.readlines()]
now_max = max(datas[1:])
max_index = (N-1) - datas[::-1].index(now_max)
now_min = min(datas)
min_index = datas.index(_min)
if max_index > min_index:
diff = now_max - _min
else:
diff = now_max - datas[0]
for i in range(1,N-1):
if i == max_index:
now_max = max(datas[i+1:])
max_index = datas.index(now_max,i+1)
new_diff = now_max - datas[i]
if diff < new_diff:
diff = new_diff
print(diff)
| Traceback (most recent call last):
File "/tmp/tmp8i7p158_/tmpyw4mfbvy.py", line 3, in <module>
N,*datas = [int(i) for i in stdin.readlines()]
^^^^^^^^
ValueError: not enough values to unpack (expected at least 1, got 0)
| |
s257081376 | p02258 | u114628916 | 1517670175 | Python | Python3 | py | Runtime Error | 0 | 0 | 537 | from sys import stdin
N,*datas = [int(i) for i in stdin.readlines()]
now_max = max(datas[1:])
max_index = (N-1) - reversed(datas).index(now_max)
_min = min(datas)
min_index = datas.index(_min)
if max_index > min_index:
diff = now_max - _min
else:
diff = now_max - datas[0]
for i in range(1,N-1):
if i == max_index:
now_max = max(datas[i+1:])
max_index = datas.index(now_max,i+1)
new_diff = now_max - datas[i]
if diff < new_diff:
diff = new_diff
print(diff)
| Traceback (most recent call last):
File "/tmp/tmpeqbktjrf/tmpg__t0uwd.py", line 3, in <module>
N,*datas = [int(i) for i in stdin.readlines()]
^^^^^^^^
ValueError: not enough values to unpack (expected at least 1, got 0)
| |
s361925663 | p02258 | u150984829 | 1518263382 | Python | Python3 | py | Runtime Error | 0 | 0 | 97 | import sys
s=1e10,b=-s
input()
for r in map(int,sys.stdin):
if b<r-s:b=r-s
if s>r:s=r
print(b)
| File "/tmp/tmps4i3tnwi/tmph_pyikfb.py", line 2
s=1e10,b=-s
^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s779702055 | p02258 | u526040679 | 1518434569 | Python | Python3 | py | Runtime Error | 0 | 0 | 358 | n = input()
r = [input() for i in range(n)]
r_temp_min = r[0]
ans = r[1]-r[0]
for r_i in r[1:]:
if ans < (r_i - r_temp_min):
ans = r_i - r_temp_min
for i,r_i in enumerate(r):
if r_temp_min <= r_i:
continue
r_temp_min = r_i
for r_j in enumerate(r[i:]):
if ans < (r_j - r_i):
ans = r_j - r_i
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpm4m54ixd/tmpqlifms3r.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s653170010 | p02258 | u608789460 | 1518846641 | Python | Python3 | py | Runtime Error | 0 | 0 | 227 | n=int(input())
nums=[]
for i in range(n):
nums.appemd(int(input()))
for i in range(1,n):
v=nums[i]
j=i-1
while j>=0 and nums[j]>v:
nums[j+1]=nums[j]
j-=1
nums[j+1]=v
print(nums[n-1]-nums[0])
| Traceback (most recent call last):
File "/tmp/tmp7gnh268y/tmpiy0yisir.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s358243382 | p02258 | u608789460 | 1518846897 | Python | Python3 | py | Runtime Error | 0 | 0 | 207 | import sys
input()
minv = int(input())
maxv = -1000000000
for r in map(int,sys.stdin.readlines()):
m = r-minv
if maxv < m:
maxv = m
if m < 0: minv = r
elif m < 0: minv = r
print(maxv
| File "/tmp/tmpg__cziwu/tmp2zig6ema.py", line 14
print(maxv
^
SyntaxError: '(' was never closed
| |
s381509722 | p02258 | u641357568 | 1520118068 | Python | Python3 | py | Runtime Error | 0 | 0 | 260 | import sys
length = int(sys.stdin.readline())
value =[ int(num) for num in sys.stdin.readlines() ]
minv = value[0]
maxv = value[1] - value[0]
for i in range(1,length):
maxv = max(maxv,value[i] - minv)
minv = min(minv,value[i])
print(maxv)
return 0
| File "/tmp/tmpsytux0gq/tmpm_cb1u67.py", line 14
return 0
^^^^^^^^
SyntaxError: 'return' outside function
| |
s068113817 | p02258 | u032662562 | 1520495021 | Python | Python3 | py | Runtime Error | 0 | 0 | 404 | # -*- coding: utf-8 -*
import sys
#if False:
if True:
fh=open('ALDS1_1_D6.txt','r')
else:
fh=sys.stdin
input=fh.readline
def main():
n = int(input())
a=[]
for _ in range(n):
a.append(int(input()))
pmax=a[1]-a[0]
for k in range(0, n-1):
p=max(a[k+1:])-a[k]
if p > pmax:
pmax=p
print(pmax)
if __name__ == "__main__":
main()
| Traceback (most recent call last):
File "/tmp/tmpj10rdj75/tmp_z5ukpd4.py", line 5, in <module>
fh=open('ALDS1_1_D6.txt','r')
^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'ALDS1_1_D6.txt'
| |
s728323985 | p02258 | u906360845 | 1520691514 | Python | Python3 | py | Runtime Error | 0 | 0 | 265 | import sys
if __name__ == ‘__main__’:
args = sys.argv
prices = map(int, args[1:])
min = prices[1]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
return max_profit
| File "/tmp/tmpdwxs6bbr/tmpazds9h4h.py", line 3
if __name__ == ‘__main__’:
^
SyntaxError: invalid character '‘' (U+2018)
| |
s807196229 | p02258 | u906360845 | 1520691670 | Python | Python3 | py | Runtime Error | 0 | 0 | 265 | import sys
if __name__ == ‘__main__’:
args = sys.argv
prices = map(int, args[1:])
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
return max_profit
| File "/tmp/tmpwbmbclyr/tmphtxvhyol.py", line 3
if __name__ == ‘__main__’:
^
SyntaxError: invalid character '‘' (U+2018)
| |
s040679336 | p02258 | u906360845 | 1520691731 | Python | Python3 | py | Runtime Error | 0 | 0 | 198 | import sys
args = sys.argv
prices = map(int, args[1:])
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpx2j8ux12/tmpw3i8swud.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
TypeError: 'map' object is not subscriptable
| |
s769919866 | p02258 | u906360845 | 1520691890 | Python | Python3 | py | Runtime Error | 0 | 0 | 198 | import sys
args = sys.argv
prices = map(int, args[2:])
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpvlj451u2/tmpgbpoz3g0.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
TypeError: 'map' object is not subscriptable
| |
s734378846 | p02258 | u906360845 | 1520692157 | Python | Python3 | py | Runtime Error | 0 | 0 | 198 | import sys
args = sys.argv
prices = map(int, args[2:])
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpzi4g4au8/tmp9r_7crfa.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
TypeError: 'map' object is not subscriptable
| |
s745481052 | p02258 | u906360845 | 1520692416 | Python | Python3 | py | Runtime Error | 0 | 0 | 204 | import sys
args = sys.argv
prices = list(map(int, args[2:]))
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpecl2d7i1/tmp3i64845y.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
IndexError: list index out of range
| |
s747220552 | p02258 | u906360845 | 1520692602 | Python | Python3 | py | Runtime Error | 0 | 0 | 204 | import sys
args = sys.argv
prices = list(map(int, args[2:]))
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpu7ak3yuo/tmpp_o3m33s.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
IndexError: list index out of range
| |
s993495095 | p02258 | u906360845 | 1520692615 | Python | Python3 | py | Runtime Error | 0 | 0 | 204 | import sys
args = sys.argv
prices = list(map(int, args[2:]))
min = prices[0]
max_profit = 0
for price in prices:
if min > price:
min = price
max_profit = price - min
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmpb8yhf_57/tmpg1817tcl.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
IndexError: list index out of range
| |
s371340110 | p02258 | u906360845 | 1520692769 | Python | Python3 | py | Runtime Error | 0 | 0 | 208 | import sys
args = sys.argv
prices = list(map(int, args[2:]))
min = prices[0]
max_profit = 0
for price in prices[1:]:
max_profit = price - min
if min > price:
min = price
print(max_profit)
| Traceback (most recent call last):
File "/tmp/tmp2kl0jfel/tmpdwiurwq8.py", line 5, in <module>
min = prices[0]
~~~~~~^^^
IndexError: list index out of range
| |
s136537982 | p02258 | u906360845 | 1520693689 | Python | Python3 | py | Runtime Error | 0 | 0 | 234 | n = input()
prices = list()
for idx in range(n):
tmp = index()
prices.append(tmp)
minp = prices[0]
maxv = prices[1] - prices[0]
for price in prices:
maxp = max(maxp, price - min)
minv = min(minv, price)
print(maxp)
| Traceback (most recent call last):
File "/tmp/tmppy1wd23e/tmpk21ogx3d.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s784399661 | p02258 | u873860437 | 1521298595 | Python | Python | py | Runtime Error | 0 | 0 | 196 | n = int(input())
maxv = -2000000000
lst = [int(input()) for _ in range(n)]
minv = lst[0]
for i in range(n + 1):
maxv = max([maxv, lst[i] - minv])
minv = min([minv, lst[i])
print(maxv)
| File "/tmp/tmpa_9op6f6/tmpf63eqr5f.py", line 11
minv = min([minv, lst[i])
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s215034015 | p02258 | u873860437 | 1521298676 | Python | Python3 | py | Runtime Error | 0 | 0 | 194 | n = int(input())
maxv = -2000000000
lst = [int(input()) for _ in range(n)]
minv = lst[0]
for i in range(1, n):
maxv = max([maxv, lst[i] - minv])
minv = min([minv, lst[i])
print(maxv)
| File "/tmp/tmptg_9qqv2/tmpd4o_blma.py", line 11
minv = min([minv, lst[i])
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s519057984 | p02258 | u873860437 | 1521302044 | Python | Python3 | py | Runtime Error | 0 | 0 | 184 | n = int(input())
maxv = -2000000000
minv = int(intput())
for i in range(1, n):
cur = int(input())
maxv = max([maxv, cur - minv])
minv = min([minv, cur])
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmp4k02kctk/tmp9gjzbfy1.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s769396343 | p02258 | u691071335 | 1522411428 | Python | Python | py | Runtime Error | 0 | 0 | 378 | #include <iostream>
#include <algorithm>
using namespace std;
static const int MAX = 200000;
int main() {
int R[MAX], n;
cin >> n;
for(int i =0; i<n; i++) cin >> R[i];
int maxv = -2000000000;
int minv = R[0];
for(int i =1; i<n; i++){
maxv = max(maxv, R[i] - minv);
minv = min(minv, R[i]);
}
cout << maxv << endl;
return 0;
}
| File "/tmp/tmpmr_p70v6/tmp4ahc75uq.py", line 3
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s269826089 | p02258 | u342125850 | 1522975520 | Python | Python3 | py | Runtime Error | 0 | 0 | 242 | alues = set_values()
max_value = min(values) - max(values)
for i in range(1, int(input())):
for j in range(0, i-1):
print(i, j, len(values))
if max_value < (values[i] - values[j]):
max_value = (values[i] - values[j])
print(max_value)
| Traceback (most recent call last):
File "/tmp/tmpb170qtp5/tmpi7uv9hen.py", line 1, in <module>
alues = set_values()
^^^^^^^^^^
NameError: name 'set_values' is not defined
| |
s009870326 | p02258 | u342125850 | 1522975545 | Python | Python3 | py | Runtime Error | 0 | 0 | 245 | values = set_values()
max_value = min(values) - max(values)
for i in range(1, int(input())):
for j in range(0, i-1):
print(i, j, len(values))
if max_value < (values[i] - values[j]):
max_value = (values[i] - values[j])
print(max_value)
| Traceback (most recent call last):
File "/tmp/tmp1i9ecqsf/tmpufx7jng2.py", line 1, in <module>
values = set_values()
^^^^^^^^^^
NameError: name 'set_values' is not defined
| |
s755917936 | p02258 | u597526649 | 1523014640 | Python | Python3 | py | Runtime Error | 0 | 0 | 193 | n = input()
r = []
for i in range(n):
r.append(input())
maxv = int(-20000000)
minv = int r[0]
for i in ranfe(n)
maxv = max(maxv, r[i]-minv)
minv = min(minv, r[i])
print(maxv)
| File "/tmp/tmptvud2_9j/tmp93ujn4z0.py", line 8
minv = int r[0]
^
SyntaxError: invalid syntax
| |
s918985046 | p02258 | u597526649 | 1523015014 | Python | Python3 | py | Runtime Error | 0 | 0 | 195 | n = input()
r = []
for i in range(n):
r.append(input())
maxv = int(-20000000)
minv = int(r[0])
for i in ranfe(n):
maxv = max(maxv, r[i]-minv)
minv = min(minv, r[i])
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmp13cloyoq/tmp2wjqrvjw.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s574112902 | p02258 | u269391636 | 1523336999 | Python | Python3 | py | Runtime Error | 0 | 0 | 207 | n = int(input())
a = []
nowmin = a[0]
for i in range(n):
a.append(int(input()))
ans = a[1]-a[0]
for i in range(n-1):
if a[i] < nowmin
k = max(a[i+1:]) - a[i]
if k > ans:
ans = k
print(ans)
| File "/tmp/tmpzxpubcph/tmpx_u7lv3z.py", line 8
if a[i] < nowmin
^
SyntaxError: expected ':'
| |
s715739351 | p02258 | u269391636 | 1523337006 | Python | Python3 | py | Runtime Error | 0 | 0 | 208 | n = int(input())
a = []
nowmin = a[0]
for i in range(n):
a.append(int(input()))
ans = a[1]-a[0]
for i in range(n-1):
if a[i] < nowmin:
k = max(a[i+1:]) - a[i]
if k > ans:
ans = k
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpi4tr24n0/tmphv1pvlz_.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s539920496 | p02258 | u269391636 | 1523337014 | Python | Python3 | py | Runtime Error | 0 | 0 | 215 | n = int(input())
a = []
nowmin = a[0]
for i in range(n):
a.append(int(input()))
ans = a[1]-a[0]
for i in range(n-1):
if a[i] < nowmin:
k = max(a[i+1:]) - a[i]
if k > ans:
ans = k
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpqquy6u9j/tmpkvz8qd05.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s892317765 | p02258 | u269391636 | 1523337891 | Python | Python3 | py | Runtime Error | 0 | 0 | 301 | n = int(input())
a = []
for i in range(n):
a.append(int(input()))
nowmin = a[0] + 1
nowmax = max(a[1:])
ans = a[1]-a[0]
for i in range(n-1):
if a[i] < nowmin:
k = nowmax - a[i]
if k > ans:
ans = k
nowmin = a[i]
elif a[i] == nowmax]
nowmax = max(a[i+1])
print(ans)
| File "/tmp/tmpohtsevfw/tmp2q5fbr_h.py", line 14
elif a[i] == nowmax]
^
SyntaxError: unmatched ']'
| |
s073330918 | p02258 | u269391636 | 1523337906 | Python | Python3 | py | Runtime Error | 0 | 0 | 301 | n = int(input())
a = []
for i in range(n):
a.append(int(input()))
nowmin = a[0] + 1
nowmax = max(a[1:])
ans = a[1]-a[0]
for i in range(n-1):
if a[i] < nowmin:
k = nowmax - a[i]
if k > ans:
ans = k
nowmin = a[i]
elif a[i] == nowmax:
nowmax = max(a[i+1])
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp3ejte2nx/tmp8dbr0guf.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s627808367 | p02258 | u597526649 | 1523531876 | Python | Python3 | py | Runtime Error | 0 | 0 | 168 | n = int(input())
maxv = int(-20000000)
minv = int(input())
for i in range(n):
r= int(input())
maxv = max(maxv, r-minv)
minv = min(minv, r)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpydvdixsm/tmpwcj4_g0u.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s098449881 | p02258 | u597526649 | 1523531936 | Python | Python3 | py | Runtime Error | 0 | 0 | 170 | n = int(input())
maxv = int(-20000000)
minv = int(input())
for i in range(n):
r= int(input())
maxv = max(maxv, r - minv)
minv = min(minv, r)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpmydr9l4t/tmpsnh5hqvq.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s229396022 | p02258 | u017435045 | 1523951724 | Python | Python3 | py | Runtime Error | 0 | 0 | 174 | n = int(input())
a =[int(input()) for i in range(n)]
b = []
for i in range(n):
for j in range(i+1, n+1):
b.append(a[j]-a[i])
b.sort()
print(b[n-1])
| Traceback (most recent call last):
File "/tmp/tmpjhn16_di/tmpxxw3d9z0.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s820047497 | p02258 | u017435045 | 1523951797 | Python | Python3 | py | Runtime Error | 0 | 0 | 168 | n = int(input())
a =[int(input()) for i in range(n)]
b = []
for i in range(n):
for j in range(i+1, n+1):
b.append(a[j]-a[i])
b.sort()
b.pop()
| Traceback (most recent call last):
File "/tmp/tmp14jqu2jc/tmphto6w8nn.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s398276419 | p02258 | u017435045 | 1523952027 | Python | Python3 | py | Runtime Error | 0 | 0 | 193 | n = int(input())
a =[int(input()) for i in range(n)]
b = []
for i in range(n):
for j in range(i+1, n+1):
b.append(a[j]-a[i])
c = sorted(b, reverse = True)
print(c[0])
| Traceback (most recent call last):
File "/tmp/tmpr0m83ngb/tmpvbm4ye5k.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s443539719 | p02258 | u017435045 | 1523952078 | Python | Python3 | py | Runtime Error | 0 | 0 | 207 | n = int(input())
a = []
for i in range(n):
a[i] = int(input())
b = []
for i in range(n):
for j in range(i+1, n+1):
b.append(a[j]-a[i])
c = sorted(b, reverse = True)
print(c[0])
| Traceback (most recent call last):
File "/tmp/tmpex8d3ha3/tmpdnctm48s.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s455473329 | p02258 | u017435045 | 1523952097 | Python | Python3 | py | Runtime Error | 0 | 0 | 210 | n = int(input())
a = []
for i in range(n):
a.append(int(input()))
b = []
for i in range(n):
for j in range(i+1, n+1):
b.append(a[j]-a[i])
c = sorted(b, reverse = True)
print(c[0])
| Traceback (most recent call last):
File "/tmp/tmp9tf_g3_2/tmpr9fiuh4u.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s472617594 | p02258 | u017435045 | 1523952814 | Python | Python3 | py | Runtime Error | 0 | 0 | 225 | n = int(input())
a = [int(input()) for i in range(n)]
maximum = a[1]-a[0]
minimum = min(a[0], a[1])
for i in range(n):
minimum = min(minimum, a[i])
maximum = max(maximum, a[i] - minumum)
print(maximum)
| Traceback (most recent call last):
File "/tmp/tmpt03_zjt2/tmplihu1t8d.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s662404117 | p02258 | u017435045 | 1523954034 | Python | Python3 | py | Runtime Error | 0 | 0 | 172 | n = int(input())
a = [int(input()) for i in range(n)]
ma = a[1]-a[0]
mi = a[0]
for i in range(1,n+1):
mi = min(mi, a[i])
ma = max(ma, a[i] - mi)
print(ma)
| Traceback (most recent call last):
File "/tmp/tmpoxxp48sd/tmp7oh017ea.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s128935375 | p02258 | u413145445 | 1524008601 | Python | Python3 | py | Runtime Error | 0 | 0 | 333 | #
# P.48 O(n^2)となる単純な回答(比較用)
#
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_D
#
import sys
values = [int(input()) for i in range(input())]
maxv = - sys.maxsize - 1
for i in values:
for j in values:
val = i - j
if maxv < val:
maxv = val
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmp5ihm80xy/tmpiuujbvve.py", line 8, in <module>
values = [int(input()) for i in range(input())]
^^^^^^^
EOFError: EOF when reading a line
| |
s916361210 | p02258 | u413145445 | 1524010173 | Python | Python3 | py | Runtime Error | 0 | 0 | 332 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value) # 今までの最小値を保持(自分と自分を比較しない様に、最大値の評価後に計算)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmptqjz9dsa/tmpt0r7_ftm.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s045919733 | p02258 | u413145445 | 1524010238 | Python | Python3 | py | Runtime Error | 0 | 0 | 219 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpbokg1cje/tmp9jyqt2ql.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s996328894 | p02258 | u413145445 | 1524010373 | Python | Python3 | py | Runtime Error | 0 | 0 | 247 | import sys
input_amount = int(input())
values = [int(input()) for i in range(input_amount)]
maxv = - sys.maxsize - 1
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmph0hu9lpm/tmpqvg6ogdn.py", line 3, in <module>
input_amount = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s772300965 | p02258 | u413145445 | 1524010495 | Python | Python3 | py | Runtime Error | 0 | 0 | 217 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpva4f4i33/tmpe7jhe44n.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s050053156 | p02258 | u413145445 | 1524010555 | Python | Python3 | py | Runtime Error | 0 | 0 | 207 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpi7ipy8pz/tmpp26tu7mt.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s484818250 | p02258 | u413145445 | 1524010564 | Python | Python3 | py | Runtime Error | 0 | 0 | 195 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmptosp1pu0/tmp78r9axza.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s563802630 | p02258 | u413145445 | 1524010595 | Python | Python3 | py | Runtime Error | 0 | 0 | 197 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for value in enumerate(values):
maxv = max(maxv, value - minv)
# minv = min(minv, value)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpdvjc4aff/tmp46d9djt3.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s178510597 | p02258 | u413145445 | 1524010604 | Python | Python3 | py | Runtime Error | 0 | 0 | 199 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for value in enumerate(values):
# maxv = max(maxv, value - minv)
# minv = min(minv, value)
print(maxv)
| File "/tmp/tmp557pdvsp/tmpy5q8m0ks.py", line 8
print(maxv)
^
IndentationError: expected an indented block after 'for' statement on line 5
| |
s763560017 | p02258 | u413145445 | 1524010631 | Python | Python3 | py | Runtime Error | 0 | 0 | 193 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for val in enumerate(values):
# maxv = max(maxv, val - minv)
# minv = min(minv, val)
print(maxv)
| File "/tmp/tmpgv7zfdt9/tmp6bw3xqv7.py", line 8
print(maxv)
^
IndentationError: expected an indented block after 'for' statement on line 5
| |
s105534727 | p02258 | u413145445 | 1524010674 | Python | Python3 | py | Runtime Error | 0 | 0 | 163 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, val - minv)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpz0ykbf5m/tmp0be3lsii.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s794115463 | p02258 | u413145445 | 1524010695 | Python | Python3 | py | Runtime Error | 0 | 0 | 165 | values = [int(input()) for i in range(int(input()))]
maxv = - 1000000
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, (val - minv))
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpth4068_w/tmppglee8a_.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s185788577 | p02258 | u413145445 | 1524010708 | Python | Python3 | py | Runtime Error | 0 | 0 | 164 | values = [int(input()) for i in range(int(input()))]
maxv = -1000000
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, (val - minv))
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmp3x19x3fs/tmpfd1_5p0f.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s840162487 | p02258 | u413145445 | 1524010765 | Python | Python3 | py | Runtime Error | 0 | 0 | 183 | values = [int(input()) for i in range(int(input()))]
maxv = -1000000
minv = values[0]
for val in enumerate(values):
if (val - minv) > maxv:
maxv = val - minv
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpgtpow8s5/tmpgils5vt5.py", line 1, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s179042682 | p02258 | u848218390 | 1524043907 | Python | Python3 | py | Runtime Error | 0 | 0 | 173 | n = float(input())
A = []
for i in range(n): A.append(float(input()))
B = A[:-1]
mini = min(B)
min_idx = B.index(mini)
C = A[min_idx+1:]
maxi = max(C)
print(maxi - mini)
| Traceback (most recent call last):
File "/tmp/tmpryc10iuo/tmp_pts7rpj.py", line 1, in <module>
n = float(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s029353863 | p02258 | u413145445 | 1524096655 | Python | Python3 | py | Runtime Error | 0 | 0 | 212 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, (val - minv))
minv = min(minv, val)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpq_lipsoh/tmpr156c3o7.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s779643133 | p02258 | u413145445 | 1524096686 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, (val - minv))
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmp7sgx6yql/tmp84owuyvz.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s981424977 | p02258 | u413145445 | 1524096715 | Python | Python3 | py | Runtime Error | 0 | 0 | 177 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for val in enumerate(values):
minv = min(minv, val)
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpm73yhy9c/tmpxq1kenxh.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s345029685 | p02258 | u413145445 | 1524096751 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for val in enumerate(values):
maxv = max(maxv, (val - minv))
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpfhpaczkk/tmp0nfawkhi.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s112466969 | p02258 | u413145445 | 1524096963 | Python | Python3 | py | Runtime Error | 0 | 0 | 242 | import sys
values = [int(input()) for i in range(int(input()))]
maxv = - sys.maxsize - 1
minv = values[0]
for val in enumerate(values):
if maxv < (val - minv):
maxv = val - minv
if minv > val:
minv = val
print(maxv)
| Traceback (most recent call last):
File "/tmp/tmpmzrykjm2/tmpxqwbqb1b.py", line 3, in <module>
values = [int(input()) for i in range(int(input()))]
^^^^^^^
EOFError: EOF when reading a line
| |
s306157721 | p02258 | u196653484 | 1524125737 | Python | Python3 | py | Runtime Error | 0 | 0 | 359 | #16D8101012J 伊藤惇 dj Python3
import sys
def Maximum_Profit(n,A):
Max=-sys.maxint-1
for i in range(n-1):
tmp=(max(A[i+1:])-A[i])
if Max<tmp:
Max=tmp
return Max
if __name__ == "__main__":
n=int(input())
A=[]
for i in range(n):
A.append(int(input()))
Max=Maximum_Profit(n,A)
print(Max)
| Traceback (most recent call last):
File "/tmp/tmpnx3hnb0v/tmphjy6l1dh.py", line 13, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s008754740 | p02258 | u826549974 | 1524564484 | Python | Python3 | py | Runtime Error | 0 | 0 | 236 | n = int(input())
A = [int(input()) for i in range(n)]
max = A[1]-A[0]
min = A[0]
for i in range(1,n-1):
if(min > A[i]):
for j in range(j,n-1):
if(max < A[j+1]-A[i]):
max = A[j+1]-A[i]
print(max)
| Traceback (most recent call last):
File "/tmp/tmp6acz64t1/tmpn60p9cbp.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s920038495 | p02258 | u826549974 | 1524564757 | Python | Python3 | py | Runtime Error | 0 | 0 | 236 | n = int(input())
A = [int(input()) for i in range(n)]
max = A[1]-A[0]
min = A[0]
for i in range(1,n-2):
if(min > A[i]):
for j in range(j,n-1):
if(max < A[j+1]-A[i]):
max = A[j+1]-A[i]
print(max)
| Traceback (most recent call last):
File "/tmp/tmpcdxx8hup/tmp_45a2uyt.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s396049639 | p02258 | u826549974 | 1524564779 | Python | Python3 | py | Runtime Error | 0 | 0 | 236 | n = int(input())
A = [int(input()) for i in range(n)]
max = A[1]-A[0]
min = A[0]
for i in range(1,n-2):
if(min > A[i]):
for j in range(j,n-1):
if(max < A[j+1]-A[i]):
max = A[j+1]-A[i]
print(max)
| Traceback (most recent call last):
File "/tmp/tmpix4rk17g/tmpbor8g66g.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.