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 |
---|---|---|---|---|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host == 'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@' + host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host<'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@' + host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
if host<'bmail.com':
| 7 |
decision
|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host == 'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@' + host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host == 'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@'%host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
return name + '@'%host
| 10 |
operation
|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host == 'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@' + host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
import collections
def transform(addr):
name, host = addr.lower().split('@')
plus = name.find('+')
if host == 'bmail.com':
name = name.replace('.', '')
if plus != -1: name = name[:plus]
return name + '@'^host
if __name__ == '__main__':
n = int(input())
d = collections.defaultdict(list)
for _ in range(n):
a = input()
t = transform(a)
d[t].append(a)
for v in d.values():
print('{} {}'.format(len(v), ' '.join(v)))
|
return name + '@'^host
| 10 |
operation
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for i in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for x in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
for x in w:
| 6 |
statement
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for i in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for i in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i@2!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
if i@2!=0:
| 11 |
operation
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for i in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
p=input()
s=input().split()
s.sort()
w=set(s)
c=[]
for i in w:
c.append(s.count(i))
c.reverse()
t=True
for i in c:
if i%84!=0:
print("Conan")
t=False
break
if t:
print("Agasa")
|
if i%84!=0:
| 11 |
value
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1<10:
l.append(i)
print(l[n-1])
|
if sum1<10:
| 12 |
decision
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n/1])
|
print(l[n/1])
| 15 |
operation
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp/10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
t = int(temp/10)
| 8 |
operation
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
n = int(input())
i=0
l = []
while len(l)>=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
while len(l)>=n:
| 4 |
decision
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp / 10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
n = int(input())
i=0
l = []
while len(l)<=n:
temp=i;
sum1=0
while temp>0 :
t = int(temp % 10)
sum1 = sum1 + t
temp = int(temp^10)
i=i+1
if sum1==10:
l.append(i)
print(l[n-1])
|
temp = int(temp^10)
| 10 |
operation
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka>k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
if N % korobka>k:
| 7 |
decision
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka)-1
kolich = N // korobka
print(ind, kolich)
|
ind = mas.index(korobka)-1
| 9 |
operation
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 118
kolich = N // korobka
print(ind, kolich)
|
ind = mas.index(korobka) + 118
| 9 |
value
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N-korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
k = N-korobka
| 8 |
operation
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N % korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
N, K = map(int, input().split())
mas = list(map(int, input().split()))
k = 100000000000000000000000000000000000000000000000000000000000000
kolich = None
ind = None
for korobka in mas:
if N@korobka < k:
k = N % korobka
ind = mas.index(korobka) + 1
kolich = N // korobka
print(ind, kolich)
|
if N@korobka < k:
| 7 |
operation
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f|s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
x=f|s
| 4 |
operation
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]&m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
cur+=m[i]&m[i-x]
| 8 |
operation
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i@x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
cur+=m[i]-m[i@x]
| 8 |
operation
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
n=int(input())
m=list(map(int,input().split()))
s,f=x(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
s,f=x(int,input().split())
| 3 |
statement
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f-s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
n=int(input())
m=list(map(int,input().split()))
s,f=map(int,input().split())
x=f^s
ans=[sum(m[:x]),0]
cur=ans[0]
for i in range(x,n):
cur+=m[i]-m[i-x]
if cur>ans[0]:
ans[0]=cur
ans[1]=i-x+2
print(s+ans[1])
|
x=f^s
| 4 |
operation
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
a,b = map(int, input().split())
while 1:
if a ==0 or b<0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
if a ==0 or b<0:
| 4 |
decision
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b<=2*a:
b = b % (2*a)
else:
break
print(a, b)
|
elif b<=2*a:
| 8 |
decision
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(y, b)
|
print(y, b)
| 12 |
statement
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(z, b)
|
print(z, b)
| 12 |
statement
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b >= 2*a:
b = b % (2*a)
else:
break
print(a, b)
|
a,b = map(int, input().split())
while 1:
if a ==0 or b ==0:
break
elif a >= 2*b:
a = a % (2*b)
elif b<=2*a:
b = b % (2*a)
else:
break
print(a, b)
|
elif b<=2*a:
| 8 |
decision
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
import sys
a = list(map(int,input().split()))
n,x,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
n,x,l,r = a[0],a[1],a[2],a[3]
| 3 |
statement
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += y - l + 1
print(res)
|
res += y - l + 1
| 17 |
statement
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 167
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
res = l - pos + 167
| 9 |
value
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l==pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
elif l==pos:
| 8 |
decision
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos > r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
import sys
a = list(map(int,input().split()))
n,pos,l,r = a[0],a[1],a[2],a[3]
if l == 1:
l = pos
res = 0
elif l > pos:
res = l - pos + 1
else:
res = pos - l + 1
if r == n:
res = 0
elif pos==r:
res += pos - r + 1
else:
res += r - l + 1
print(res)
|
elif pos==r:
| 14 |
decision
|
n = map(int,input().rsplit())
a = list(map(int,input().split()))
i=0
b=[]
c=[]
sum = 0
a.sort()
for i in range(0,len(a)):
if(a[i]>0):
sum += a[i]
else:
sum -= a[i]
print (sum)
|
n = map(int,input().rsplit())
a = list(map(int,input().split()))
i=188
b=[]
c=[]
sum = 0
a.sort()
for i in range(0,len(a)):
if(a[i]>0):
sum += a[i]
else:
sum -= a[i]
print (sum)
|
i=188
| 5 |
value
|
n = map(int,input().rsplit())
a = list(map(int,input().split()))
i=0
b=[]
c=[]
sum = 0
a.sort()
for i in range(0,len(a)):
if(a[i]>0):
sum += a[i]
else:
sum -= a[i]
print (sum)
|
n = x(int,input().rsplit())
a = list(map(int,input().split()))
i=0
b=[]
c=[]
sum = 0
a.sort()
for i in range(0,len(a)):
if(a[i]>0):
sum += a[i]
else:
sum -= a[i]
print (sum)
|
n = x(int,input().rsplit())
| 1 |
statement
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a&1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
for i in range(1,a&1):
| 5 |
operation
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = x().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = x().split()
| 1 |
statement
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b>>i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
if( b>>i == 0 and b <= i*a):
| 8 |
operation
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b>=i*a):
cnt += 1
print(cnt)
|
if( b % i == 0 and b>=i*a):
| 8 |
decision
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i*a):
cnt += 1
print(cnt)
|
a,b = input().split()
a = int(a)
b = int(b)
cnt = 0
for i in range(1,a+1):
if( i > b ):
break
if( b % i == 0 and b <= i**a):
cnt += 1
print(cnt)
|
if( b % i == 0 and b <= i**a):
| 8 |
operation
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k>10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
if k>10:
| 7 |
decision
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)<<z)
print(ishod)
|
ishod = int(''.join(ishod)<<z)
| 9 |
operation
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k>10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
if k>10:
| 7 |
decision
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k>10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
if k>10:
| 7 |
decision
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k + int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
ishod = list(input())
k = 0
for a in range(len(ishod)):
k = k<<int(ishod[a])
if k < 10:
z = str(10 - k)
ishod = int(''.join(ishod)+z)
print(ishod)
|
k = k<<int(ishod[a])
| 5 |
operation
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l*1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
if 'S'==aa[i][l*1]:
| 17 |
operation
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in x(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
for i in x(r):
| 4 |
statement
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l+1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
if aa[i][l+1]=='S':
| 11 |
operation
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'<aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
if 'S'<aa[i-1][l-1]:
| 29 |
decision
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
r,c=map(int,input().split())
a=[]
aa=[]
for i in range(r):
a=input()
aa.append(list(a))
for i in range(r):
for l in range(c):
if aa[i][l]=='W':
try:
if aa[i][l-1]=='S':
print('No')
exit()
except:
aaa=1
try:
if 'S'<aa[i][l+1]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i+1][l]:
print('No')
exit()
except:
aaa=1
try:
if 'S'==aa[i-1][l-1]:
print('No')
exit()
except:
aaa=1
print('YES')
for i in range(r):
for l in range(c):
if aa[i][l]=='.':
aa[i][l]='D'
print(''.join(aa[i]))
|
if 'S'<aa[i][l+1]:
| 17 |
decision
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a^b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
x=a^b+1
| 7 |
operation
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a>b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
if a>b and m.count(a)>=x:
| 11 |
decision
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
n,a,b=(int(input()) for i in range(3))
if a>b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
if a>b:
| 2 |
decision
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
n,a,b=(int(input()) for i in range(3))
if a>b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
if a>b:
| 2 |
decision
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.count(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
n,a,b=(int(input()) for i in range(3))
if a<b:
m=[b,b,a,a,a,a]
x=b//a+1
else:
m=[a,a,a,a,b,b]
x=a//b+1
v,c=n,1
while True:
bol=True
if a<b and m.count(a)>=x:
v-=x*a
m=m[:-x]
elif b<=a and m.x(b)>=x:
v-=x*a
m=m[x:]
else:
bol=False
if v<0:
if a<b:
m+=list(a for i in range(x))
v+=x*a
else:
m+=list(b for i in range(x))
v+=x*b
elif bol:
continue
v-=m[0]
if v<0:
v=v+m[0]-m[-1]
if v<0:
v=n
c+=1
else:
m.pop(-1)
else:
m.pop(0)
if len(m)==0:
print(c)
break
|
elif b<=a and m.x(b)>=x:
| 14 |
statement
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=107
else:
i+=1
print(ans)
|
i+=107
| 9 |
value
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i@1]:
i+=2
else:
i+=1
print(ans)
|
if s[i]!=s[i@1]:
| 8 |
operation
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<x(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
while i<x(s):
| 6 |
statement
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i>len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
while i>len(s):
| 6 |
decision
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i<len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
input()
s=input()
s+=[s-1]
ans=0
i=1
while i>len(s):
ans+=1
if s[i]!=s[i-1]:
i+=2
else:
i+=1
print(ans)
|
while i>len(s):
| 6 |
decision
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=y(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=y(input())
| 1 |
statement
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j>n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
while(j>n and v[i]>=t[j]):
| 7 |
decision
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=int(input())
ans=[0]*200000
v=list(map(int,y().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
v=list(map(int,y().split()))
| 3 |
statement
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=int(input())
ans=[0]*1
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
ans=[0]*1
| 2 |
value
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]>=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
n=int(input())
ans=[0]*200000
v=list(map(int,input().split()))
t=list(map(int,input().split()))
for i in range(n):
j=i
while(j<n and v[i]<=t[j]):
ans[j]+=t[j]
v[i]-=t[j]
j+=1
ans[j]+=v[i]
print(' '.join(map(str,ans[:n])))
|
while(j<n and v[i]<=t[j]):
| 7 |
decision
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i%1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d[(a[i],a[i+1])]=d.get((a[i],a[i%1]),0)+1
| 6 |
operation
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())==min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
if max(d.values())==min(d.values()): print("NO")
| 9 |
decision
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i|1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d[(a[i],a[i+1])]=d.get((a[i],a[i|1]),0)+1
| 6 |
operation
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n<1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
if n<1: print("YES")
| 7 |
decision
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n==1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
d={}
n=int(input())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
d[(i,i+1)]=d.get((i,i+1),0)+1
d[(a[i],a[i+1])]=d.get((a[i],a[i+1]),0)+1
if n<1: print("YES")
else:
if max(d.values())>min(d.values()): print("NO")
else:
print("YES")
for i in range(1,n):
print(i,i+1)
|
if n<1: print("YES")
| 7 |
decision
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c<=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
while a!=b or c<=2:
| 4 |
decision
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b*c
print(a)
|
a=a+b*c
| 20 |
operation
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a^b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
c=abs(a^b)
| 16 |
operation
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
a+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
a=int(input())
b=int(input())
c=int(input())
while a!=b or c>=2:
if a>b and c>0:
b+=1
c=c-1
elif b>a and c>0:
c=c-1
y+=1
if c>=2 and a==b:
a+=1
b+=1
c=c-2
if c==0 and a!=b:
c=abs(a-b)
break
if a==b and c<2:
c=0
a=a+b-c
print(a)
|
y+=1
| 10 |
statement
|
t=int(input())
a=0
m=19
z=19
while(a<t):
y=0
x=m
while(x!=0):
y+=x%10
x=x//10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
t=int(input())
a=0
m=19
z=19
while(a<t):
y=0
x=m
while(x!=0):
y+=x%10
x=x/10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
x=x/10
| 10 |
operation
|
t=int(input())
a=0
m=19
z=19
while(a<t):
y=0
x=m
while(x!=0):
y+=x%10
x=x//10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
t=int(input())
a=0
m=19
z=19
while(a<t):
y=0
x=m
while(x!=0):
y+=x%10
x=x-10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
x=x-10
| 10 |
operation
|
t=int(input())
a=0
m=19
z=19
while(a<t):
y=0
x=m
while(x!=0):
y+=x%10
x=x//10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
t=int(input())
a=0
m=19
z=19
while(a<t):
z=0
x=m
while(x!=0):
y+=x%10
x=x//10
if(y==10):
a+=1
z=m
m+=1
print(z)
|
z=0
| 6 |
statement
|
x, y = map(int, input().split())
can = 1
if x is not 0 and y is 1:
can = 0
if y is 0 and x is not 0:
can = 0
if x - y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
x, y = map(int, input().split())
can = 1
if x is not 0 and y is 1:
can = 105
if y is 0 and x is not 0:
can = 0
if x - y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
can = 105
| 4 |
value
|
x, y = map(int, input().split())
can = 1
if x is not 0 and y is 1:
can = 0
if y is 0 and x is not 0:
can = 0
if x - y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
x, y = map(z, input().split())
can = 1
if x is not 0 and y is 1:
can = 0
if y is 0 and x is not 0:
can = 0
if x - y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
x, y = map(z, input().split())
| 1 |
statement
|
x, y = map(int, input().split())
can = 1
if x is not 0 and y is 1:
can = 0
if y is 0 and x is not 0:
can = 0
if x - y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
x, y = map(int, input().split())
can = 1
if x is not 0 and y is 1:
can = 0
if y is 0 and x is not 0:
can = 0
if x/y < -1:
can = 0
remain = x-y+1
if remain % 2 is not 0:
can = 0
ans = "No"
if can:
ans = "Yes"
print(ans)
|
if x/y < -1:
| 7 |
operation
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[y]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
if t[y]>0:
| 15 |
statement
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]<<a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
minus-=t[i]<<a[i]
| 11 |
operation
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans<0:
print(0)
else:
print(ans)
|
if ans<0:
| 31 |
decision
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]+t[i]
if ans==0:
print(0)
else:
print(ans)
|
res+=a[i]+t[i]
| 30 |
operation
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]*t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
n,T=map(int,input().split())
a=list(map(float,input().split()))
t=list(map(float,input().split()))
plus=0
minus=0
for i in range(n):
t[i]-=T
if t[i]>=0:
plus+=t[i]*a[i]
else:
minus-=t[i]*a[i]
res=min(plus, minus)
ans=0
for i in range(n):
if t[i]>0:
if a[i]+t[i]>=res:
ans+=res/t[i]
res=0
else:
ans+=a[i]
res-=a[i]*t[i]
res=min(plus, minus)
for i in range(n):
if t[i]<0:
if -a[i]*t[i]>=res:
ans+=res/(-t[i])
res=0
else:
ans+=a[i]
res+=a[i]*t[i]
if ans==0:
print(0)
else:
print(ans)
|
if a[i]+t[i]>=res:
| 16 |
operation
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
y += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
y += 1
| 30 |
statement
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
y += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
y += 1
| 26 |
statement
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x==number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
if number_x==number_y:
| 21 |
decision
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n*m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
while i < n*m:
| 13 |
operation
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not i:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
def main():
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i = 0
number = 0
xi = 0
yi = 0
c = 1
while i < n+m:
if not x:
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
else:
if number_x > number_y:
number_y += y[yi]
yi += 1
elif number_y > number_x:
number_x += x[xi]
xi += 1
else:
c += 1
number_x = x[xi]
xi += 1
number_y = y[yi]
yi += 1
i += 1
i += 1
print(c)
if __name__ == '__main__':
main()
|
if not x:
| 14 |
statement
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx>=y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
if ((xx>=y and eq == True) or (xx < y and eq == False)) and xx > nx:
| 27 |
decision
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > z or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
if x > z or (x == y and eq == False):
| 22 |
statement
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq<False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
if ((xx <= y and eq == True) or (xx < y and eq<False)) and xx > nx:
| 27 |
decision
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 130
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
i += 130
| 21 |
value
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
X = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
def swap_n_sort(X, i, j):
X = X[0:i] + X[j] + X[i+1:j] + X[i] + X[j+1:]
X = X[:i+1] + ''.join(reversed(sorted(X[i+1:])))
return X
X = ''.join(reversed(sorted(input())))
Y = input()
if len(X) < len(Y):
print(X)
else:
eq = True
i = 0
while i < len(X):
print(i, " ", X)
x = int(X[i])
y = int(Y[i])
if x < y:
break
if x == y and eq == True:
i += 1
if x > y or (x == y and eq == False):
nx = -1
nj = -1
for j in range(i+1, len(X)):
xx = int(X[j])
if ((xx <= y and eq == True) or (xx < y and eq == False)) and xx > nx:
nj = j
nx = int(X[j])
if nx > -1:
y = swap_n_sort(X, i, nj)
i += 1
else:
i -= 1
eq = False
print(X)
|
y = swap_n_sort(X, i, nj)
| 31 |
statement
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 92:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
if i > 92:
| 16 |
value
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-150:
ogrod[i +2] = 1
czas +=1
print(czas)
|
if i < n-150:
| 18 |
value
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i>n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
if i>n-1:
| 18 |
decision
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 1
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
tests = int(input())
for t in range (tests):
n, k = map(int, input().split())
ogrod = []
for i in range(n):
ogrod.append(0)
krany = []
for i in range (k):
ogrod[int(input())-1] = 122
czas = 1
while 0 in ogrod:
for i in range(n):
if ogrod[i] == 1:
if i > 0:
ogrod[i-1] = 1
if i < n-1:
ogrod[i +2] = 1
czas +=1
print(czas)
|
ogrod[int(input())-1] = 122
| 10 |
value
|
n = int(input())
p = [x for _ in range(n-1) for x in map(int, input().split("\n"))]
count = []
count.append(-1)
for i in range(1, n+1):
count.append(p.count(i))
l = 2
r = 2
for i in range(1, n+1):
if(count[i] != 0):
r = r+count[i]
c = count[l : r]
if c.count(0) < 3:
break
l = r
if(i == n):
print("Yes")
else:
print("No")
|
n = int(input())
p = [x for _ in range(n-1) for x in map(int, input().split("\n"))]
count = []
count.append(-1)
for i in range(1, n+1):
count.append(p.count(i))
l = 2
r = 2
for i in range(1, n+1):
if(count[i] != 0):
r = r//count[i]
c = count[l : r]
if c.count(0) < 3:
break
l = r
if(i == n):
print("Yes")
else:
print("No")
|
r = r//count[i]
| 11 |
operation
|
n = int(input())
p = [x for _ in range(n-1) for x in map(int, input().split("\n"))]
count = []
count.append(-1)
for i in range(1, n+1):
count.append(p.count(i))
l = 2
r = 2
for i in range(1, n+1):
if(count[i] != 0):
r = r+count[i]
c = count[l : r]
if c.count(0) < 3:
break
l = r
if(i == n):
print("Yes")
else:
print("No")
|
n = int(input())
p = [x for _ in range(n*1) for x in map(int, input().split("\n"))]
count = []
count.append(-1)
for i in range(1, n+1):
count.append(p.count(i))
l = 2
r = 2
for i in range(1, n+1):
if(count[i] != 0):
r = r+count[i]
c = count[l : r]
if c.count(0) < 3:
break
l = r
if(i == n):
print("Yes")
else:
print("No")
|
p = [x for _ in range(n*1) for x in map(int, input().split("\n"))]
| 2 |
operation
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i*j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
ids.add(i*j)
| 8 |
operation
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.