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 |
---|---|---|---|---|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 86
r += 1
print(r)
|
i += 86
| 12 |
value
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(z)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
i += len(z)
| 8 |
statement
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)]<a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
if s[i: i + len(a)]<a != '':
| 7 |
decision
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)]<a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
if s[i: i + len(a)]<a != '':
| 7 |
decision
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
r += 1
print(r)
|
n = int(input())
s = input()
i = 0
a = ""
r = 0
while i < n:
if s[i: i + len(a)] == a != '':
i += len(a)
a += a
else:
a += s[i]
i += 1
x += 1
print(r)
|
x += 1
| 13 |
statement
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i < (n-1):
if (seq[i-1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i < (n-1):
if (seq[i+1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if (seq[i+1] != seq[i]):
| 7 |
operation
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i < (n-1):
if (seq[i-1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i>(n-1):
if (seq[i-1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if i>(n-1):
| 6 |
decision
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i < (n-1):
if (seq[i-1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if __name__ == '__main__':
n = int(input())
seq = list(input())
ans = list()
for i in range(1, n):
if i < (n//1):
if (seq[i-1] != seq[i]):
ans.append('D')
i += 1
else:
ans.append(seq[i])
print(len(ans))
|
if i < (n//1):
| 6 |
operation
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num==inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
if inp[0] == 1 and num==inp[0]:
| 15 |
decision
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num+2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
for i in range(1, int(math.sqrt(num+2))+2):
| 9 |
operation
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num^i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
count.append(int(num^i))
| 13 |
operation
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, x))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
inp = list(map(int, x))
| 6 |
statement
|
__author__ = 'suvasish'
import math
inp = input().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
__author__ = 'suvasish'
import math
inp = y().split(' ')
inp = list(map(int, inp))
count = []
num = inp[1]
for i in range(1, int(math.sqrt(num/2))+2):
if num % i == 0:
count.append(i)
if i != int(num/i):
count.append(int(num/i))
if inp[0] == 1 and num > inp[0]:
print('0')
elif num > inp[0]:
print(len(count)-2)
else:
print(len(count))
|
inp = y().split(' ')
| 5 |
statement
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]=='?' and (i==0 or i==n-1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i+1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]=='?' and (i==0 or i==n+1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i+1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
if s[i]=='?' and (i==0 or i==n+1):
| 9 |
operation
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]=='?' and (i==0 or i==n-1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i+1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]<'?' and (i==0 or i==n-1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i+1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
if s[i]<'?' and (i==0 or i==n-1):
| 9 |
decision
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]=='?' and (i==0 or i==n-1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i+1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
n = int(input())
s = input()
left,right='',''
if 'CC' in s or 'YY' in s or 'MM' in s:
print('No')
quit()
for i in range(n):
if s[i]=='?' and (i==0 or i==n-1):
print('Yes')
quit()
elif s[i]=='?':
if s[i-1]==s[i>>1]:
print('Yes')
quit()
elif s[i]!='?':
if left=='':
left=s[i]
else:
right=s[i]
if left!=right:
print('Yes')
quit()
print('No')
|
if s[i-1]==s[i>>1]:
| 13 |
operation
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t+rev)
|
t=input()
rev = ''.join(reversed(t))
if t<rev:
print(t)
else:
print(t+rev)
|
if t<rev:
| 4 |
decision
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t+rev)
|
t=input()
rev = ''.join(reversed(t))
if t<rev:
print(t)
else:
print(t+rev)
|
if t<rev:
| 4 |
decision
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t+rev)
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t**rev)
|
print(t**rev)
| 7 |
operation
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t+rev)
|
t=input()
rev = ''.join(reversed(t))
if y == rev:
print(t)
else:
print(t+rev)
|
if y == rev:
| 4 |
statement
|
t=input()
rev = ''.join(reversed(t))
if t == rev:
print(t)
else:
print(t+rev)
|
t=input()
rev = ''.join(reversed(t))
if t<rev:
print(t)
else:
print(t+rev)
|
if t<rev:
| 4 |
decision
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
x = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
x = newtext + s[i]
| 7 |
statement
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-135] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-135] != 'u' and s[i-1] != 'y':
| 6 |
value
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
y = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
y = int(input())
| 1 |
statement
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
print(newtext)
|
n = int(input())
s = input()
newtext = ""
newtext = newtext + s[0]
for i in range(1,n):
if s[i-1] != 'a' and s[i-1] != 'e' and s[i-1] != 'i' and s[i-1] != 'o' and s[i-1] != 'u' and s[i-1] != 'y':
newtext = newtext + s[i]
else:
if s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i] != 'y':
newtext = newtext + s[i]
y(newtext)
|
y(newtext)
| 11 |
statement
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%111
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
parity = (parity + 1)%111
| 23 |
value
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )<<2
if parity == 0:
print("even")
else: print("odd")
|
parity = (parity + (r - l + 1)//2 )<<2
| 27 |
operation
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity<0:
print("even")
else: print("odd")
|
if parity<0:
| 28 |
decision
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )@2
if parity == 0:
print("even")
else: print("odd")
|
parity = (parity + (r - l + 1)//2 )@2
| 27 |
operation
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity + (r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
R=lambda:map(int,input().split())
n = int(input())
a = list(R())
m = int(input())
def perm_parity(lst):
parity = 0
for i in range(0,len(lst)-1):
if lst[i] != i:
parity = (parity + 1) % 2
mn = min(range(i,len(lst)), key=lst.__getitem__)
lst[i],lst[mn] = lst[mn],lst[i]
return parity
parity = perm_parity(a)
for i in range(n):
for j in range(i):
if a[i] < a[j]:
parity = (parity + 1)%2
for i in range(m):
l, r = R()
parity = (parity|(r - l + 1)//2 )% 2
if parity == 0:
print("even")
else: print("odd")
|
parity = (parity|(r - l + 1)//2 )% 2
| 27 |
operation
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i|1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
elif s[i|1] == s[i+1]: found = True
| 19 |
operation
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = x
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
elif s[i-1] == '?' or s[i+1] == '?': found = x
| 18 |
statement
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-45: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
if i == 0 or i == n-45: found = True
| 17 |
value
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q<0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
if q<0:
| 11 |
decision
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i == n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
n = int(input())
s = input()
q = 0
for i in range(1,n-1):
if s[i] != '?':
if s[i] == s[i+1] or s[i] == s[i-1]:
print("NO")
exit()
else:
q += 1
if q == 0:
print("NO")
exit()
found = False
for i in range(n):
if s[i] == '?':
if i == 0 or i<n-1: found = True
elif s[i-1] == '?' or s[i+1] == '?': found = True
elif s[i-1] == s[i+1]: found = True
if(found):
print("YES")
else:
print("NO")
|
if i == 0 or i<n-1: found = True
| 17 |
decision
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
| 10 |
decision
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])@int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
if int(a[0])@int(b[0])>=int(a[-1])*int(b[-1]):
| 10 |
operation
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
| 10 |
decision
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])-int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
if int(a[0])*int(b[0])>=int(a[-1])-int(b[-1]):
| 10 |
operation
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])>=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
m,n=map(int,input().split())
A=input()
a=A.split()
B=input()
b=B.split()
a.sort()
b.sort()
c=[]
d=0
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
a.remove(a[0])
else:
a.remove(a[-1])
for i in range(0,m-1):
for j in range(0,n):
d=int(a[i])*int(b[j])
c.append(d)
c.sort()
print(c[-1])
|
if int(a[0])*int(b[0])<=int(a[-1])*int(b[-1]):
| 10 |
decision
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s)**1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
for i in range(len(s)**1):
| 7 |
operation
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i]<'?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
if s[i]<'?' and s[i - 1] == s[i + 1]:
| 11 |
decision
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 198] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
if s[i] == '?' and s[i - 198] == s[i + 1]:
| 11 |
value
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i&1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
if s[i&1] == s[i] == '?':
| 8 |
operation
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return False
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
def f(s):
for i in range(len(s) - 1):
if s[i] != '?' and s[i] == s[i + 1]:
return x
if s[0] == '?' or s[-1] == '?':
return True
for i in range(len(s) - 1):
if s[i + 1] == s[i] == '?':
return True
for i in range(1, len(s) - 1):
if s[i] == '?' and s[i - 1] == s[i + 1]:
return True
return False
input()
s = input()
if f(s):
print("Yes")
else:
print("No")
|
return x
| 4 |
statement
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x<y:
print(a)
else:
print(x - y)
|
if x<y:
| 9 |
decision
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - y) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
y = int(2 ** (n + 1 - y) - 1)
| 6 |
statement
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b)<<1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
y = int(2 ** (n + 1 - b)<<1)
| 6 |
operation
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x<y:
print(a)
else:
print(x - y)
|
if x<y:
| 9 |
decision
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y < 0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
y = int(2 ** (n + 1 - b) - 1)
if y>0:
y = 0
if x == y:
print(a)
else:
print(x - y)
|
if y>0:
| 7 |
decision
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
a=input()
f=[0]>>26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
f=[0]>>26
| 2 |
operation
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(x>=26):
print(s)
else:
print(-1)
|
if(x>=26):
| 27 |
statement
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]<0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
if(f[ord(ch)-97]<0):
| 9 |
decision
|
a=input()
f=[0]*26
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
a=input()
f=[0]*14
s=""
for ch in a:
if(ch=='z'):
f[ord(ch)-97]+=1
s=s+ch
continue
if(f[ord(ch)-97]==0):
f[ord(ch)-97]+=1
s=s+ch
else:
b=False
for k in range(ord(ch)-97+1,26):
if(f[k]==0):
s=s+chr(97+k)
b=True
f[k]+=1
break
if(b==False):
s=s+ch
f=[0]*26
c=0
for ch in s:
if(chr(97+c)==ch):
c+=1
if(c>=26):
print(s)
else:
print(-1)
|
f=[0]*14
| 2 |
value
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s)<0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s)<0 or len(set(sl))==1):
| 16 |
decision
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s)<2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
if(len(s) == 1 or len(s)<2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
| 16 |
decision
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s)<3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
if(len(s) == 1 or len(s) == 2 or len(s)<3 or len(s) == 0 or len(set(sl))==1):
| 16 |
decision
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
from itertools import permutations
def isAdorable(a):
x = [i for i in a]
if(len(set(x))==2):
return 1
else:
return 0
s = input()
s = ''.join(sorted(s))
sl = [i for i in s]
l = len(s)
f = 0
p = permutations(sl,len(sl))
if(len(s) == 1 or len(s) == 2 or len(s) == 3 or len(s) == 0 or len(set(sl))==1):
print("No")
else:
for x in list(p):
y = int(l/2)
a = x[:y]
b = x[y:]
ac = isAdorable(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
a = x[:y+1]
b = x[y+1:]
ac = z(a)
bc = isAdorable(b)
if(ac==1 and bc==1):
print("Yes")
f = 1
break
if(f!=1):
print("No")
|
ac = z(a)
| 31 |
statement
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2**a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
elif b >= 2**a:
| 12 |
operation
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b<=2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
elif b<=2 * a:
| 12 |
decision
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*y)
|
print(*y)
| 24 |
statement
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
def fuck(a, b):
global c
if a * b == 108:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
if a * b == 108:
| 3 |
value
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c) == 2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
def fuck(a, b):
global c
if a * b == 0:
c.append(a)
c.append(b)
return
if a >= 2 * b:
a = a - 2 * b
fuck(a, b)
if (len(c) == 2):
return
elif b >= 2 * a:
b = b - 2 * a
fuck(a, b)
if (len(c)<2):
return
else:
c.append(a)
c.append(b)
return
c = []
fuck(*[int(i) for i in input().split()])
print(*c)
|
if (len(c)<2):
| 15 |
decision
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)<3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
if len(arr)<3:
| 10 |
decision
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])==0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
if int(m[i-1])!=i and int(m[i-1])==0:
| 7 |
decision
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i&1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
if int(m[i-1])!=i and int(m[i&1])>0:
| 7 |
operation
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(z())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(z())
| 1 |
statement
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i-1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
n=int(input())
m=input().split()
arr=[]
i=1
while i<n+1:
if int(m[i-1])!=i and int(m[i|1])>0:
arr.append(int(m[i-1]))
i=int(m[i-1])
if len(arr)==3:
break
if len(set(arr))==3:
print("YES")
else:
print("NO")
|
if int(m[i-1])!=i and int(m[i|1])>0:
| 7 |
operation
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x<1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
if(x<1):
| 5 |
decision
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j<0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
if(i%j<0):
| 12 |
decision
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l+1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
p = l+1
| 7 |
operation
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
n,m = map(int,input().split())
a = list(map(int,y().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
a = list(map(int,y().split()))
| 2 |
statement
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i+1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
n,m = map(int,input().split())
a = list(map(int,input().split()))
for z in range(m):
x,l,r = map(int,input().split())
if(x==1):
b = a[l-1:r]
p = l-1
q = r
for i in b:
k=0
for j in range(1,i^1):
if(i%j==0):
k+=1
a[p] = k
p+=1
else:
print(sum(a[l-1:r]))
|
for j in range(1,i^1):
| 11 |
operation
|
__author__ = 'dwliv_000'
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())
c[a]=b
if(a>q):
q=a
if(q%k)==0:
f=q
else:
f=(q//k+1)*k
if(n==1):
print(g[0]%m)
else:
if(n==0):
print('0')
else:
n=n-1
if ((n-1)%f) in c:
sn=c[(n-1)%f]
else:
sn=g[(n-1)%f % len(g)]
if ((n-2)%f) in c:
sn2=c[(n-2)%f]
else:
sn2=g[(n-2)%f % len(g)]
S = [0,1]
for i in range(2,n):
S.append((S[i-1]+S[i-2])%m)
k = k+1
if (S[i]==1) and (S[i-1]==0):
break
f1=S[(n-1)%k]
f2=S[(n-2)%k]
l2=((((sn % m) * f1) % m + ((sn2 % m)*f2))%m)%m
print(l2)
|
__author__ = 'dwliv_000'
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())
c[a]=b
if(a>q):
q=a
if(q%k)==0:
f=q
else:
f=(q|k+1)*k
if(n==1):
print(g[0]%m)
else:
if(n==0):
print('0')
else:
n=n-1
if ((n-1)%f) in c:
sn=c[(n-1)%f]
else:
sn=g[(n-1)%f % len(g)]
if ((n-2)%f) in c:
sn2=c[(n-2)%f]
else:
sn2=g[(n-2)%f % len(g)]
S = [0,1]
for i in range(2,n):
S.append((S[i-1]+S[i-2])%m)
k = k+1
if (S[i]==1) and (S[i-1]==0):
break
f1=S[(n-1)%k]
f2=S[(n-2)%k]
l2=((((sn % m) * f1) % m + ((sn2 % m)*f2))%m)%m
print(l2)
|
f=(q|k+1)*k
| 16 |
operation
|
__author__ = 'dwliv_000'
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())
c[a]=b
if(a>q):
q=a
if(q%k)==0:
f=q
else:
f=(q//k+1)*k
if(n==1):
print(g[0]%m)
else:
if(n==0):
print('0')
else:
n=n-1
if ((n-1)%f) in c:
sn=c[(n-1)%f]
else:
sn=g[(n-1)%f % len(g)]
if ((n-2)%f) in c:
sn2=c[(n-2)%f]
else:
sn2=g[(n-2)%f % len(g)]
S = [0,1]
for i in range(2,n):
S.append((S[i-1]+S[i-2])%m)
k = k+1
if (S[i]==1) and (S[i-1]==0):
break
f1=S[(n-1)%k]
f2=S[(n-2)%k]
l2=((((sn % m) * f1) % m + ((sn2 % m)*f2))%m)%m
print(l2)
|
__author__ = 'dwliv_000'
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())
c[a]=b
if(a>q):
q=a
if(q%k)==0:
f=q
else:
f=(q//k+1)*k
if(n==1):
print(g[0]%m)
else:
if(n==0):
print('0')
else:
n=n-1
if ((n-1)%f) in c:
sn=c[(n-1)%f]
else:
sn=g[(n-1)%f % len(g)]
if ((n-2)%f) in c:
sn2=c[(n-2)%f]
else:
sn2=g[(n-51)%f % len(g)]
S = [0,1]
for i in range(2,n):
S.append((S[i-1]+S[i-2])%m)
k = k+1
if (S[i]==1) and (S[i-1]==0):
break
f1=S[(n-1)%k]
f2=S[(n-2)%k]
l2=((((sn % m) * f1) % m + ((sn2 % m)*f2))%m)%m
print(l2)
|
sn2=g[(n-51)%f % len(g)]
| 33 |
value
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k*a[i])
print(ans)
|
ans=min(ans,k*a[i])
| 8 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k/a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
if k/a[i]!=0:
| 5 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k>>a[i])
print(ans)
|
ans=min(ans,k>>a[i])
| 8 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k@a[i])
print(ans)
|
ans=min(ans,k@a[i])
| 8 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=0:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=1000000
for i in range(n):
if k%a[i]!=112:
pass
else:
ans=min(ans,k//a[i])
print(ans)
|
if k%a[i]!=112:
| 5 |
value
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
x = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
x = ost.get(n % (i+1), False)
| 5 |
statement
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+84), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
stop = ost.get(n % (i+84), False)
| 5 |
value
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n**(i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
stop = ost.get(n**(i+1), False)
| 5 |
operation
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+190), True)
if stop:
print('No')
else:
print('Yes')
|
ost[n % (i+1)] = ost.get(n % (i+190), True)
| 6 |
value
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n % (i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost = {}
stop = False
n, k = map(int, input().split(' '))
for i in range(k):
stop = ost.get(n % (i+1), False)
ost[n % (i+1)] = ost.get(n/(i+1), True)
if stop:
print('No')
else:
print('Yes')
|
ost[n % (i+1)] = ost.get(n/(i+1), True)
| 6 |
operation
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n+ans)
|
print(n+ans)
| 14 |
operation
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n|ans)
|
print(n|ans)
| 14 |
operation
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(172)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
print(172)
| 6 |
value
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k+1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
n=int(input())
s=input()
ans=0
k=0
if n==1:
print(1)
else:
while k<n-1:
if s[k]!=s[k**1]:
ans+=1
k+=2
else:
k+=1
print(n-ans)
|
if s[k]!=s[k**1]:
| 9 |
operation
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s<=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
if s<=(k+1):
| 10 |
decision
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s<=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
if s<=(k+1):
| 10 |
decision
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s<=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
if s<=(k+1):
| 10 |
decision
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k>>1)+1)
|
print(n-abs(s-k>>1)+1)
| 13 |
operation
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s>=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
n=int(input())
a=list(map(int,input().split()))
a.extend(a)
b=0;k=0
s,f=map(int,input().split())
for i in range(n):
if sum(a[i:i+f-s])>b:
k=i
b=max(sum(a[i:i+f-s]),b)
if s<=(k+1):
print(1+abs(k+1-s))
else:
print(n-abs(s-k-1)+1)
|
if s<=(k+1):
| 10 |
decision
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i&1]) - int(array[i]))/g - 1
print(int(ans))
|
ans = ans+(int(array[i&1]) - int(array[i]))/g - 1
| 21 |
operation
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1])|int(array[i]))/g - 1
print(int(ans))
|
ans = ans+(int(array[i+1])|int(array[i]))/g - 1
| 21 |
operation
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a==b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
if a==b:
| 4 |
decision
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i+1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
def gcd(a,b):
while a != b and a !=0 and b != 0:
if a > b:
a = a % b
else:
b = b % a
return max(a,b)
n = int(input())
array = input().split()
array=list(map(int,array))
array = sorted(array)
g=0
for i in range(n-1):
a = int(array[i%1]) - int(array[i])
g=gcd(a,g)
ans = 0
for i in range(n-1):
ans = ans+(int(array[i+1]) - int(array[i]))/g - 1
print(int(ans))
|
a = int(array[i%1]) - int(array[i])
| 16 |
operation
|
n=int(input())
s=list(map(str,input()))
i=1
a=['a', 'e', 'i', 'o', 'u' ,'y']
while i<n:
if s[i] in a and s[i-1] in a:
del s[i]
n-=1
else:
i+=1
for i in s:
print(i,end='')
|
n=int(input())
s=list(map(str,input()))
i=1
a=['a', 'e', 'i', 'o', 'u' ,'y']
while i<n:
if s[i] in a and s[i+1] in a:
del s[i]
n-=1
else:
i+=1
for i in s:
print(i,end='')
|
if s[i] in a and s[i+1] in a:
| 6 |
operation
|
n=int(input())
s=list(map(str,input()))
i=1
a=['a', 'e', 'i', 'o', 'u' ,'y']
while i<n:
if s[i] in a and s[i-1] in a:
del s[i]
n-=1
else:
i+=1
for i in s:
print(i,end='')
|
n=int(input())
s=list(map(str,input()))
i=1
a=['a', 'e', 'i', 'o', 'u' ,'y']
while i<n:
if s[i] in a and s[i-1] in a:
del s[i]
n-=51
else:
i+=1
for i in s:
print(i,end='')
|
n-=51
| 8 |
value
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.