original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm@60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
mm = mm@60
| 9 |
operation
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 80
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
mm = mm - 80
| 9 |
value
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60|mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
mm = 60|mm
| 13 |
operation
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while True:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
x = int(input())
hh, mm = input().split()
counter = 0
hh = int(hh)
mm = int(mm)
while z:
if mm > 59:
mm = mm - 60
hh += 1
elif mm < 0:
mm = 60 + mm
hh -= 1
if hh > 23:
hh = hh - 24
elif hh < 0:
hh = 23
if '7' in str(hh) or '7' in str(mm):
print(counter)
break
mm -= x
counter += 1
|
while z:
| 6 |
statement
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]]>0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
if dicti[l[i][-j]]>0:
| 23 |
decision
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-51,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-51,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
| 3 |
value
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10|(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
lsum[i]+=(10|(j-1))*(dicti[l[i][-j]])
| 31 |
operation
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j>>1))*(dicti[l[i][-j]])
print(sum(lsum))
|
lsum[i]+=(10**(j>>1))*(dicti[l[i][-j]])
| 31 |
operation
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j>len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum))
|
if (x==True) and (j>len(l[i])) :
| 22 |
decision
|
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m<'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
if m<'R':
| 18 |
decision
|
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
def pos(a, b):
if a<b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
if a<b:
| 2 |
decision
|
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 17
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if m[0] == 'U':
coin -= 1
print(coin)
|
r = 17
| 12 |
value
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = z - b
if bn < 0:
bn = 0
print(an + bn)
|
bn = z - b
| 8 |
statement
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if z < 0:
bn = 0
print(an + bn)
|
if z < 0:
| 9 |
statement
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn>0:
bn = 0
print(an + bn)
|
if bn>0:
| 9 |
decision
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 43:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
if an < 43:
| 6 |
value
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an + bn)
|
a, b = map(int, input().split())
x, y, z = map(int, input().split())
an = x*2 + y
bn = z*3 + y
an = an - a
if an < 0:
an = 0
bn = bn - b
if bn < 0:
bn = 0
print(an/bn)
|
print(an/bn)
| 11 |
operation
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y>0:
print('No')
else:
print('Yes')
|
if x < 0 or x % 2 != 0 or y>0:
| 8 |
decision
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x%2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
if x < 0 or x%2 != 0 or y < 0:
| 8 |
operation
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 78 != 0 or y < 0:
print('No')
else:
print('Yes')
|
if x < 0 or x % 78 != 0 or y < 0:
| 8 |
value
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x//2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
if x < 0 or x//2 != 0 or y < 0:
| 8 |
operation
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x < 0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
x, y = input().split()
x = int(x)
y = int(y)
y -= 1
x -= y
if x>0 or x % 2 != 0 or y < 0:
print('No')
else:
print('Yes')
|
if x>0 or x % 2 != 0 or y < 0:
| 8 |
decision
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer>n:
answer *= 2
answer -= 1
print(answer)
|
while answer>n:
| 10 |
decision
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer>n:
answer *= 2
answer -= 1
print(answer)
|
while answer>n:
| 10 |
decision
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 58
print(answer)
|
answer -= 58
| 12 |
value
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer>n:
answer *= 2
answer -= 1
print(answer)
|
while answer>n:
| 10 |
decision
|
def read():
return map(int, input().split())
n, k = read()
if k == 1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
def read():
return map(int, input().split())
n, k = read()
if k<1:
answer = n
else:
answer = 1
while answer < n:
answer *= 2
answer -= 1
print(answer)
|
if k<1:
| 6 |
decision
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=x(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=x(input())
| 1 |
statement
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b+a)
|
print(b+a)
| 15 |
operation
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i==0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
if i==0 :
| 6 |
decision
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b==b-a :
print(a-b)
else :
print(b-a)
|
if a-b==b-a :
| 12 |
decision
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b-a :
print(a-b)
else :
print(b-a)
|
v=int(input())
l1=[]
l2=[]
l=[int(i) for i in input().split()]
for i in l:
if i>0 :
l1.append(i)
else :
l2.append(i)
a=sum(l1)
b=sum(l2)
if a-b>b/a :
print(a-b)
else :
print(b-a)
|
if a-b>b/a :
| 12 |
operation
|
def main():
n = input()
s = input()
a= []
for x in s:
if x in 'aeiouy':
if len(a)>0 and a[-1] in 'aeiouy':
continue
else:
a.append(x)
else:
a.append(x)
print (''.join(a))
if __name__ == '__main__':
main()
|
def main():
n = input()
s = input()
a= []
for x in s:
if x in 'aeiouy':
if len(a)==0 and a[-1] in 'aeiouy':
continue
else:
a.append(x)
else:
a.append(x)
print (''.join(a))
if __name__ == '__main__':
main()
|
if len(a)==0 and a[-1] in 'aeiouy':
| 8 |
decision
|
def main():
n = input()
s = input()
a= []
for x in s:
if x in 'aeiouy':
if len(a)>0 and a[-1] in 'aeiouy':
continue
else:
a.append(x)
else:
a.append(x)
print (''.join(a))
if __name__ == '__main__':
main()
|
def main():
n = input()
s = input()
a= []
for x in s:
if x in 'aeiouy':
if len(a)>0 and a[-11] in 'aeiouy':
continue
else:
a.append(x)
else:
a.append(x)
print (''.join(a))
if __name__ == '__main__':
main()
|
if len(a)>0 and a[-11] in 'aeiouy':
| 8 |
value
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi*2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
maxi = math.ceil(maxi*2.0)
| 17 |
operation
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n<k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
if n<k:
| 8 |
decision
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1==maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
if arr[j] - arr[j - 1] - 1==maxi:
| 15 |
decision
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - z[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
if n - z[len(arr) - 1] + 1 > maxi:
| 20 |
statement
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if arr[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
import math
t = int(input())
for i in range(t):
n, k = input().split(" ")
n = int(n)
k = int(k)
arr = input().split(" ")
if n == k:
print(1, '\n')
continue
for j in range(len(arr)):
arr[j] = int(arr[j])
maxi = 0
for j in range(1, k):
if z[j] - arr[j - 1] - 1 > maxi:
maxi = arr[j] - arr[j - 1] - 1
maxi = math.ceil(maxi / 2.0)
if arr[0] > maxi:
maxi = arr[0]
if n - arr[len(arr) - 1] + 1 > maxi:
maxi = n - arr[len(arr) - 1] + 1
print(maxi, '\n')
|
if z[j] - arr[j - 1] - 1 > maxi:
| 15 |
statement
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10<<6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
count = [0 for i in range((10<<6)+1)]
| 3 |
operation
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]^2
ans += count[10**6]
print(ans)
|
count[i+1]+=count[i]^2
| 9 |
operation
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10+6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
count = [0 for i in range((10+6)+1)]
| 3 |
operation
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[i] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
n = int(input())
arr = [int(i) for i in input().split()]
count = [0 for i in range((10**6)+1)]
for i in arr:
count[y] += 1
ans = 0
for i in range((10**6)):
ans += count[i]%2
count[i+1]+=count[i]//2
ans += count[10**6]
print(ans)
|
count[y] += 1
| 5 |
statement
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count<25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
if count<25:
| 18 |
decision
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count<25 else -1)
|
print(check if count<25 else -1)
| 22 |
decision
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i]+check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
check = check[:i]+check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
| 14 |
operation
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i@1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i@1:]
| 11 |
operation
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i + 1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
s = input()
a = s.find('a')
count = 0
check = s
for i in range(a + 1, len(s)):
prev = ord(s[i - 1])
if ord(s[i]) > prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i%1:]
elif ord(s[i]) == prev:
count += 1
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]) + 1)) + check[i + 1:]
else:
count = 0
check = s
if count == 25:
break
prev = ord(s[i])
print(check if count == 25 else -1)
|
check = check[:i] + check[i].replace(check[i], chr(ord(s[i]))) + check[i%1:]
| 11 |
operation
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1>>k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
elif k1>>k2 + k3 == 10:
| 7 |
operation
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
x = 'NO'
else:
r = 'YES'
print(r)
|
x = 'NO'
| 14 |
statement
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = y(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = y(int, input().split())
| 1 |
statement
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1<3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
if k1<3 and k2 == 3 and k3 == 3:
| 4 |
decision
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1 + k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
k1, k2, k3 = map(int, input().split())
r = ''
if k1 == 3 and k2 == 3 and k3 == 3:
r = 'YES'
elif k1*k2 + k3 == 10:
r = 'YES'
elif k1 == 1 or k2 == 1 or k3 == 1:
r = 'YES'
elif k1 + k2 + k3 >= 9:
r = 'NO'
else:
r = 'YES'
print(r)
|
elif k1*k2 + k3 == 10:
| 7 |
operation
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m<arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
if m<arr[i]:
| 11 |
decision
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]<m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
if arr[i]<m:
| 6 |
decision
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m<arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
if m<arr[i]:
| 11 |
decision
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t**1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
for i in range(t**1,len(arr)):
| 10 |
operation
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t+1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
n=int(input())
arr=list(map(int,input().split()))
m=min(arr)
ans=1000000
for i in range(len(arr)):
if arr[i]==m:
t=i
break
for i in range(t/1,len(arr)):
if m==arr[i]:
k=i
ans=min(ans,abs(k-t))
t=k
print(ans)
|
for i in range(t/1,len(arr)):
| 10 |
operation
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb) + 1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb)-1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
current_symb = chr(ord(current_symb)-1)
| 13 |
operation
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb) + 1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb)+1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
current_symb = chr(ord(current_symb)+1)
| 13 |
operation
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb) + 1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb)/1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
current_symb = chr(ord(current_symb)/1)
| 13 |
operation
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for i in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb) + 1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
s = input()
current_symb = 'a'
flag = False
flag2 = False
for x in s:
if (flag2):
print(i, end = '')
continue
if ord(i) > ord(current_symb) and not flag:
print(i, end='')
if ord(i) <= ord(current_symb):
flag = True
current_symb = chr(ord(current_symb) + 1)
if (current_symb == 'z'):
flag2 = True
print('abcdefghijklmnopqrstuvwxyz', end='')
if (current_symb != 'z'):
print('-1')
|
for x in s:
| 5 |
statement
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot>=t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
if tot>=t:
| 27 |
decision
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest|highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
guess = (lowest|highest+1)//2
| 14 |
operation
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-102]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
probs.append(list(map(int, input().split()))[::-102]+[i+1])
| 5 |
value
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar>guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
while sofar>guess:
| 20 |
decision
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)//2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
n, t = map(int, input().split())
probs = []
for i in range(n):
probs.append(list(map(int, input().split()))[::-1]+[i+1])
probs = list(sorted(probs))
lowest = 0
highest = n
ans = []
while lowest < highest:
guess = (lowest+highest+1)/2
sofar = 0
probsi = 0
tot = 0
ansp = []
while sofar < guess:
if probs[probsi][1] >= guess:
sofar += 1
tot += probs[probsi][0]
ansp.append(probs[probsi][2])
probsi += 1
if tot <= t:
lowest = guess
ans = ansp
else:
highest = guess - 1
print(lowest)
print(lowest)
for i in range(len(ans)):
ans[i] = str(ans[i])
print(' '.join(ans))
|
guess = (lowest+highest+1)/2
| 14 |
operation
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p]>>points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
dist = points[second_p]>>points[first_p]
| 16 |
operation
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p]-points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
dist = points[second_p]-points[first_p]
| 16 |
operation
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points@2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
points_to_rem = num_points@2
| 10 |
operation
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points**2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
points_to_rem = num_points**2
| 10 |
operation
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p < num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
fl = input()
sl = input()
num_points, max_d = [int(x) for x in fl.split()]
points = sorted([int(x) for x in sl.split()])
first_p = 0
second_p = 1
points_to_rem = num_points - 2
min_points_to_rem = num_points
while second_p < num_points and first_p>num_points:
if num_points == 1:
break
dist = points[second_p] - points[first_p]
if dist <= max_d:
min_points_to_rem = min(min_points_to_rem, points_to_rem)
second_p += 1
points_to_rem -= 1
if dist > max_d:
first_p += 1
points_to_rem += 1
if num_points == 1:
print(0)
else:
print(min_points_to_rem)
|
while second_p < num_points and first_p>num_points:
| 13 |
decision
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + x(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
return "7" in str(d.hour) + x(d.minute)
| 5 |
statement
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1)/x + 1)
|
print((count - 1)/x + 1)
| 16 |
operation
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.x) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
while "7" not in str(c.x) + str(c.minute):
| 12 |
statement
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1) // x + 1)
|
import datetime
def is_happy(d):
return "7" in str(d.hour) + str(d.minute)
x = int(input())
h, m = map(int, input().split())
s = c = datetime.datetime.now().replace(hour=h, minute=m)
count = 0
while "7" not in str(c.hour) + str(c.minute):
c -= datetime.timedelta(minutes=1)
count += 1
print((count - 1)/x + 1)
|
print((count - 1)/x + 1)
| 16 |
operation
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1==summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
while summ1==summ2:
| 14 |
decision
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1<summ2:
count+=1
summ1=0
summ2=0
print(count)
|
if summ1<summ2:
| 17 |
decision
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=167
print(count)
|
summ2=167
| 20 |
value
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1>summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
k=input().split()
n=int(k[0])
m=int(k[1])
x=input().split()
x=list(map(int,x))
y=input().split()
y=list(map(int,y))
count=0
tec2=0
summ1=0
summ2=0
for i in range(len(x)):
summ1+=x[i]
while summ1==summ2:
summ2+=y[tec2]
tec2+=1
if summ1==summ2:
count+=1
summ1=0
summ2=0
print(count)
|
while summ1==summ2:
| 14 |
decision
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l==r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
if l==r:
| 5 |
decision
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l==r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
if l==r:
| 5 |
decision
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + y, y1, new_r)
|
print(x1 + y, y1, new_r)
| 13 |
statement
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2%y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
l = sqrt((x2 - x1) ** 2 + (y2%y1) ** 2)
| 4 |
operation
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l > r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if l==r:
print(x1, y1, r)
elif l:
new_r = (r + l) / 2
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
new_r = (r + l) / 2
print(x1 + new_r, y1, new_r)
|
if l==r:
| 5 |
decision
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
n = int(input())
s = ""
for i in range(n):
s = ((s|"I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
s = ((s|"I ") if i==0 else (s+" I "))
| 6 |
operation
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==16 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
s = ((s + "I ") if i==16 else (s+" I "))
| 6 |
value
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n==1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
if n==1 and i<n-1:
| 14 |
decision
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i==n-1:
s = s + " it"
print(s)
|
n = int(input())
s = ""
for i in range(n):
s = ((s + "I ") if i==0 else (s+" I "))
if i%2!=0:
s = s + "love"
else:
s = s + "hate"
if n>1 and i<n-1:
s = s + " that"
if i<n-1:
s = s + " it"
print(s)
|
if i<n-1:
| 17 |
decision
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if y / row <= n]
print(len(occurrences))
|
if y / row <= n]
| 21 |
statement
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f>=n, factors(x))
if x / row <= n]
print(len(occurrences))
|
occurrences = [(row, x/row) for row in filter(lambda f: f>=n, factors(x))
| 20 |
decision
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i%1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
i = i%1
| 11 |
operation
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x|i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
if x|i == 0:
| 8 |
operation
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 1
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
import sys
import math
def factors(x):
i = 1
n = min(x/2, math.sqrt(x))
while i <= n:
if x % i == 0:
yield i
yield x/i
i = i + 26
yield x
(n, x) = map(int, sys.stdin.readline().split())
if n*n < x:
print(0)
exit()
occurrences = [(row, x/row) for row in filter(lambda f: f <= n, factors(x))
if x / row <= n]
print(len(occurrences))
|
i = i + 26
| 11 |
value
|
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
if c%2!=0:
print("Conan")
else:
a=sorted(a,reverse=True)
b=[]
e=0
for i in range(n-1):
if a[i]==a[i+1]:
e+=1
else:
b.append(e)
e=0
win=0
for i in range(1,len(b)):
if b[i]%2!=0:
win=1
if win==1:
print("Conan")
else:
print("Agasa")
|
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
if c%2!=0:
print("Conan")
else:
a=sorted(a,reverse=True)
b=[]
e=0
for i in range(n-1):
if a[i]<a[i+1]:
e+=1
else:
b.append(e)
e=0
win=0
for i in range(1,len(b)):
if b[i]%2!=0:
win=1
if win==1:
print("Conan")
else:
print("Agasa")
|
if a[i]<a[i+1]:
| 18 |
decision
|
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
if c%2!=0:
print("Conan")
else:
a=sorted(a,reverse=True)
b=[]
e=0
for i in range(n-1):
if a[i]==a[i+1]:
e+=1
else:
b.append(e)
e=0
win=0
for i in range(1,len(b)):
if b[i]%2!=0:
win=1
if win==1:
print("Conan")
else:
print("Agasa")
|
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
if c%2!=0:
print("Conan")
else:
a=sorted(a,reverse=True)
b=[]
e=0
for i in range(n-1):
if a[i]==x[i+1]:
e+=1
else:
b.append(e)
e=0
win=0
for i in range(1,len(b)):
if b[i]%2!=0:
win=1
if win==1:
print("Conan")
else:
print("Agasa")
|
if a[i]==x[i+1]:
| 18 |
statement
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 6 * z)
if req < has:
print(0)
else:
print(req - has)
|
req = (2 * x + 2 * y + 6 * z)
| 5 |
value
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 55 * y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
req = (2 * x + 55 * y + 3 * z)
| 5 |
value
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 3 * z)
if req>has:
print(0)
else:
print(req - has)
|
if req>has:
| 7 |
decision
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2 * y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
a , b = map(int , input().split())
x , y ,z = map(int , input().split())
has = a + b
req = (2 * x + 2^y + 3 * z)
if req < has:
print(0)
else:
print(req - has)
|
req = (2 * x + 2^y + 3 * z)
| 5 |
operation
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.