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())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j + 1, j + 1):
if (j + k) <= i:
break
else:
if j ^ k == i:
ans += 1
print(ans)
|
n = int(input())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j + 1, j + 1):
if (j + k) <= i:
break
else:
if j ^ k<i:
ans += 1
print(ans)
|
if j ^ k<i:
| 9 |
decision
|
n = int(input())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j + 1, j + 1):
if (j + k) <= i:
break
else:
if j ^ k == i:
ans += 1
print(ans)
|
n = int(input())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j+1, j + 1):
if (j + k) <= i:
break
else:
if j ^ k == i:
ans += 1
print(ans)
|
for k in range(i - j+1, j + 1):
| 5 |
operation
|
n = int(input())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j + 1, j + 1):
if (j + k) <= i:
break
else:
if j ^ k == i:
ans += 1
print(ans)
|
n = int(input())
ans = 0
for i in range(1, n + 1):
for j in range(i // 2, i + 1):
for k in range(i - j + 1, j + 1):
if (j + k) <= i:
break
else:
if j|k == i:
ans += 1
print(ans)
|
if j|k == i:
| 9 |
operation
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I<1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
if I<1 and int(b[index]) + 4 < int(b[index + 1]):
| 15 |
decision
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 45 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
if I == 45 and int(b[index]) + 4 < int(b[index + 1]):
| 15 |
value
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1])<=int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
if int(b[index]) + int(a[1])<=int(b[index + I]):
| 12 |
decision
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I<1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
if I<1 and int(b[index]) + 4 < int(b[index + 1]):
| 15 |
decision
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
bol = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
a = input().split()
b = input().split()
result = 0
index = 0
I = 1
bo = True
x = True
while bo:
bol = True
while bol:
if int(b[index]) + int(a[1]) >= int(b[index + I]):
I = I + 1
else:
if I == 1 and int(b[index]) + 4 < int(b[index + 1]):
bol = False
bo = False
result = -1
else:
index = index + I - 1
bol = False
result = result + 1
I = 1
if index + I + 1 > len(b):
bo = False
bol = False
result = result + 1
if index + 1 > len(b):
bo = False
print (result)
|
x = True
| 8 |
statement
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=93
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
i=93
| 9 |
value
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)*len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
if(i==len(g)*len(h) or len(g)==0 or len(h)==0):
| 16 |
operation
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)<0 or len(h)==0):
print("YES")
else:
print("NO")
|
if(i==len(g)+len(h) or len(g)<0 or len(h)==0):
| 16 |
decision
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
a=int(input())
b=' '|input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
b=' '|input().strip(' ')+' '
| 2 |
operation
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
g=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
a=int(input())
b=' '+input().strip(' ')+' '
c=b.split('0')
d=b.split('1')
e=[i for i in c if i!=' ']
f=[i for i in d if i!=' ']
y=[*map(len,e)]
h=[*map(len,f)]
i=0
for j in range(len(g)):
if(g[j] in h):
i+=1
for j in range(len(h)):
if(h[j] in g):
i+=1
if(i==len(g)+len(h) or len(g)==0 or len(h)==0):
print("YES")
else:
print("NO")
|
y=[*map(len,e)]
| 7 |
statement
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i==0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i-1]=='?' or s[i+1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i==0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i-1]=='?' or s[i>>1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
elif(s[i-1]=='?' or s[i>>1]=='?'):
| 26 |
operation
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i==0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i-1]=='?' or s[i+1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i==0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i//1]=='?' or s[i+1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
elif(s[i//1]=='?' or s[i+1]=='?'):
| 26 |
operation
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i==0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i-1]=='?' or s[i+1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
n = int(input())
s = input()
flag = 0
if(n==1):
if(s[0]=='?'):
flag = 1
else:
flag = 0
else:
for i in range(n-1):
if(i<0):
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
flag = 1
else:
if(s[i]!='?'):
if(s[i]==s[i+1]):
flag = 0
break
else:
if(s[i-1]==s[i+1] and s[i-1]!='?'):
flag = 1
elif(s[i-1]=='?' or s[i+1]=='?'):
flag = 1
if(flag == 1):
print("Yes")
else:
print("No")
|
if(i<0):
| 11 |
decision
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col&1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
if col != 11 and rows[row][col&1] == 'S':
| 10 |
operation
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j)<c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
if k != 0 and rows[i][j] == '.' and nbcnt(i, j)<c:
| 17 |
decision
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if x != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
if x != 11 and rows[row][col + 1] == 'S':
| 10 |
statement
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1] == 'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
n, k = (int(s) for s in input().split())
rows = []
for i in range(n):
rows.append([c for c in input()])
def nbcnt(row, col):
res = 0
if col != 0 and rows[row][col - 1] == 'S':
res += 1
if col != 11 and rows[row][col + 1]<'S':
res += 1
return res
for c in range(3):
for i in range(n):
for j in range(12):
if k != 0 and rows[i][j] == '.' and nbcnt(i, j) == c:
rows[i][j] = 'x'
k -= 1
res = 0
for i in range(n):
for j in range(12):
if rows[i][j] != '.' and rows[i][j] != '-':
res += nbcnt(i, j)
print(res)
for i in range(n):
print("".join(rows[i]))
|
if col != 11 and rows[row][col + 1]<'S':
| 10 |
decision
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10^6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
l, r = 1, 10^6
| 8 |
operation
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10*6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
l, r = 1, 10*6
| 8 |
operation
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
n = int(input())
y = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
y = list(map(int, input().split()))
| 2 |
statement
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10&6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
need = {i: False for i in range(1, 10&6 + 1)}
| 4 |
operation
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c == n:
print(ans)
break
|
n = int(input())
a = list(map(int, input().split()))
need = {i: False for i in range(1, 10 ** 6 + 1)}
for i in a:
need[i] = True
l, r = 1, 10 ** 6
c = 0
ans = 0
while True:
ans += 1
l += 1
r -= 1
c += need[l]
c += need[r]
if c<n:
print(ans)
break
|
if c<n:
| 20 |
decision
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k**1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
sp=[n%i for i in range(1,k**1)]
| 3 |
operation
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n&i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
sp=[n&i for i in range(1,k+1)]
| 3 |
operation
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k**1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
sp=[n%i for i in range(1,k**1)]
| 3 |
operation
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for y in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
sp=[n%i for y in range(1,k+1)]
| 3 |
statement
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+1)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
n,k=[int(i) for i in input().split()]
fl=True
sp=[n%i for i in range(1,k+101)]
for i in range(1,len(sp)):
if sp[i-1]==sp[i]:
fl=False
break
if fl:
print('Yes')
else:
print('No')
|
sp=[n%i for i in range(1,k+101)]
| 3 |
value
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i-1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
sp[i+1],sp[i]=sp[i],sp[i-1]
| 13 |
operation
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=z(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
allow=z(map(lambda x: int(x), allow))
| 8 |
statement
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]==sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
if sp[i]==sp[i+1]:
| 12 |
decision
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)>>1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
for i in range(len(allow)>>1):
| 10 |
operation
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]>sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
n=int(input())
sp=input().split()
allow=list(input())
sp=list(map(lambda x: int(x),sp))
copy=sp[:]
newsp=sp[:]
tr=0
allow=list(map(lambda x: int(x), allow))
while True:
for i in range(len(allow)-1):
if allow[i]==1:
if sp[i]==sp[i+1]:
sp[i+1],sp[i]=sp[i],sp[i+1]
else:
continue
if newsp==sp:
tr+=1
else:
tr=0
if tr>=2:
break
newsp=sp[:]
if sp==sorted(copy):
print('YES')
else:
print('NO')
|
if sp[i]==sp[i+1]:
| 12 |
decision
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 28:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
if len(k) == 28:
| 6 |
value
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i]<'s':
o += s[i:].count('h')
print(o)
|
if s[i]<'s':
| 14 |
decision
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z'*k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
k = 'z'*k
| 7 |
operation
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k)<1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
if len(k)<1:
| 6 |
decision
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i] == 's':
o += s[i:].count('h')
print(o)
|
n = int(input())
mas = []
for i in range(n):
k = input()
if k[0] == 's':
if len(k) == 1:
k = 'z' + k
mas.append(k)
mas.sort()
mas.reverse()
s = ''.join(mas)
o = 0
for i in range(len(s)):
if s[i]<'s':
o += s[i:].count('h')
print(o)
|
if s[i]<'s':
| 14 |
decision
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
def main():
x, y = map(int, input().split())
if y<0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
if y<0:
| 4 |
decision
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies)&2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
if (x - n_copies)&2 == 0:
| 17 |
operation
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y%1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
n_copies = y%1
| 7 |
operation
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
def main():
x, y = map(int, input().split())
if y<0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
if y<0:
| 4 |
decision
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x - n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
def main():
x, y = map(int, input().split())
if y == 0:
return "No"
n_copies = y - 1
if n_copies > x:
return "No"
if n_copies == 0:
if x > 0:
return "No"
else:
return "Yes"
if (x+n_copies) % 2 == 0:
return "Yes"
else:
return "No"
if __name__ == '__main__':
ret = main()
print(ret)
|
if (x+n_copies) % 2 == 0:
| 17 |
operation
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -134
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
mres = -134
| 23 |
value
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i>iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
if (i>iu - 1):
| 29 |
decision
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (x < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
if (x < iu - 1):
| 29 |
statement
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 89):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
if (i < iu - 89):
| 29 |
value
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k] - e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
import sys, math, os.path
FILE_INPUT = "c.in"
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
sys.stdin = open(FILE_INPUT)
def ni():
return map(int, input().split(" "))
def nia():
return list(map(int,input().split()))
def log(x):
if (DEBUG):
print(x)
n, u = ni()
e = nia()
log(e)
mres = -1
iu = 0
for i in range(n):
while iu < n-1 and (e[iu+1]-e[i] <= u):
iu += 1
if (i < iu - 1):
j = i + 1
k = iu
enew = (e[k] - e[j]) / (e[k]@e[i])
mres = max(mres, enew)
log(f"{i} - {iu} - {mres}")
print(mres)
|
enew = (e[k] - e[j]) / (e[k]@e[i])
| 32 |
operation
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]+1)%2)
cnt2 = 1
for i in range(1,n+1):
if i==n or l[i]!=l[i-1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]*1)%2)
cnt2 = 1
for i in range(1,n+1):
if i==n or l[i]!=l[i-1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
cnt = l.index((l[0]*1)%2)
| 4 |
operation
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]+1)%2)
cnt2 = 1
for i in range(1,n+1):
if i==n or l[i]!=l[i-1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]+1)%2)
cnt2 = 1
for i in range(1,n+1):
if i==n or l[i]!=l[i&1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
if i==n or l[i]!=l[i&1]:
| 7 |
operation
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]+1)%2)
cnt2 = 1
for i in range(1,n+1):
if i==n or l[i]!=l[i-1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
n=int(input())
l=[int(x) for x in input().split()]
l.append(not l[-1])
cnt = l.index((l[0]+1)%2)
cnt2 = 1
for i in range(1,n+1):
if i<n or l[i]!=l[i-1]:
if cnt2 != cnt :
print("NO")
exit(0)
cnt2 = 1
else:
cnt2+=1
print("YES")
|
if i<n or l[i]!=l[i-1]:
| 7 |
decision
|
import sys
pow2 = [0 for i in range(10000)]
pow2[0] = 1
for i in range(1,10000):
pow2[i] = pow2[i-1]*2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
import sys
pow2 = [0 for i in range(10000)]
pow2[140] = 1
for i in range(1,10000):
pow2[i] = pow2[i-1]*2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
pow2[140] = 1
| 4 |
value
|
import sys
pow2 = [0 for i in range(10000)]
pow2[0] = 1
for i in range(1,10000):
pow2[i] = pow2[i-1]*2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
import sys
pow2 = [0 for i in range(10000)]
pow2[0] = 1
for i in range(1,10000):
pow2[i] = pow2[i^1]*2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
pow2[i] = pow2[i^1]*2
| 6 |
operation
|
import sys
pow2 = [0 for i in range(10000)]
pow2[0] = 1
for i in range(1,10000):
pow2[i] = pow2[i-1]*2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
import sys
pow2 = [0 for i in range(10000)]
pow2[0] = 1
for i in range(1,10000):
pow2[i] = pow2[i-1]+2
for i in range(10000):
pow2[i] = str(pow2[i])
n = int(input(''))
l = []
for i in range(n):
l.append(input(''))
for line in l:
for i in range(len(pow2)):
if(pow2[i].startswith(line)):
print(i)
break
|
pow2[i] = pow2[i-1]+2
| 6 |
operation
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count//len(ls))
|
print(count//len(ls))
| 11 |
operation
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count/len(ls))
|
print(count/len(ls))
| 11 |
operation
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
if __name__<'__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
if __name__<'__main__':
| 1 |
decision
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
ls = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
if __name__ == '__main__':
n = int(input())
ls = input()
ls = ls.split(' ')
x = [int(x) for x in ls]
count = 0
if 0 in ls:
count = -1
ls = set(ls)
print(count + len(ls))
|
x = [int(x) for x in ls]
| 5 |
statement
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
n=int(y())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
n=int(y())
| 1 |
statement
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min@1,1000000-Max))
|
print(max(ans,Min@1,1000000-Max))
| 13 |
operation
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min&1,1000000-Max))
|
print(max(ans,Min&1,1000000-Max))
| 13 |
operation
|
n=int(input())
l=list(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
n=int(input())
l=y(map(int,input().split()))
Min=0
Max=1000000
ans=0
for i in l:
if(i==500000):
ans=499999
elif(i>500000 and i<Max):
Max=i
elif (i < 500000 and i>Min):
Min = i
print(max(ans,Min-1,1000000-Max))
|
l=y(map(int,input().split()))
| 2 |
statement
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__ == "__main__":
main()
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)|set([0]))
scores.sort()
print(len(scores))
if __name__ == "__main__":
main()
|
scores=list(set(scores)|set([0]))
| 6 |
operation
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__ == "__main__":
main()
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__<"__main__":
main()
|
if __name__<"__main__":
| 11 |
decision
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__ == "__main__":
main()
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__<"__main__":
main()
|
if __name__<"__main__":
| 11 |
decision
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__ == "__main__":
main()
|
import sys
def main():
n=int(sys.stdin.readline())
scores=[int(x) for x in sys.stdin.readline().split()]
scores=list(set(scores)-set([0]))
scores.sort()
print(len(scores))
if __name__<"__main__":
main()
|
if __name__<"__main__":
| 11 |
decision
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x + b//x>=n:
x+=1
else:
break
print(x-1)
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x + b//x>=n:
x+=1
else:
break
print(x|1)
|
print(x|1)
| 10 |
operation
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x + b//x>=n:
x+=1
else:
break
print(x-1)
|
n,a,b=map(int,input().split())
x=1
while True:
if a^x + b//x>=n:
x+=1
else:
break
print(x-1)
|
if a^x + b//x>=n:
| 5 |
operation
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x + b//x>=n:
x+=1
else:
break
print(x-1)
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x//b//x>=n:
x+=1
else:
break
print(x-1)
|
if a//x//b//x>=n:
| 5 |
operation
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x + b//x>=n:
x+=1
else:
break
print(x-1)
|
n,a,b=map(int,input().split())
x=1
while True:
if a//x^b//x>=n:
x+=1
else:
break
print(x-1)
|
if a//x^b//x>=n:
| 5 |
operation
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 177 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
if z[i] < 177 and z[i] != -1:
| 18 |
value
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[y] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
if z[y] < 3 and z[i] != -1:
| 18 |
statement
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i]<[]:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
if m[i]<[]:
| 10 |
decision
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n + 1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
n = int(input())
d = []
for i in range(n - 1):
d.append(int(input()))
m = {i:[] for i in range(1, n-1)}
z = {i:0 for i in range(1, n + 1)}
for i in range(len(d)):
m[d[i]].append(i + 2)
for i in m:
if m[i] == []:
z[i] = -1
for i in m:
for j in m[i]:
if z[j] == -1:
z[i] += 1
f = True
for i in z:
if z[i] < 3 and z[i] != -1:
f = False
break
if f:
print('Yes')
else:
print('No')
|
m = {i:[] for i in range(1, n-1)}
| 5 |
operation
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n*1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
for i in range (n*1) :
| 6 |
operation
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i]>3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
if dic[i]>3 :
| 15 |
decision
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in y :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
if m not in y :
| 8 |
statement
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i]>3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
if dic[i]>3 :
| 15 |
decision
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 1
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
n = int (input ())
if n < 4 :
print ('No')
else :
dic = {}
for i in range (n - 1) :
m = int (input ())
if m not in dic :
dic.setdefault (m,0)
dic[m] += 1
flag = 19
for i in range (n) :
if i in dic :
if dic[i] < 3 :
flag = 0
break
if flag :
print ('Yes')
else :
print ('No')
|
flag = 19
| 12 |
value
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff<1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
if (tmp != cnt and ff<1):
| 19 |
decision
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 57):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
if (f == 57):
| 15 |
value
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 190):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
for i in range (0, blen, 190):
| 9 |
value
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff<1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
if (tmp != cnt and ff<1):
| 19 |
decision
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt + 1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
n = int(input())
b = input()
blen = len(b)
mask = "0"
cnt = 0
tmp = 0
f = 1
ff = 1
for i in range (0, blen, 2):
if (i == 0):
mask = b[i]
cnt = cnt**1
continue
if (b[i] != b[i-2]):
if (f == 1):
f = 0
tmp = tmp + 1
else:
if (tmp != cnt and ff == 1):
print ("NO")
ff = 0
else:
tmp = 1
else:
if (f == 1):
cnt = cnt + 1
else:
tmp = tmp + 1
if (ff == 1):
if (f == 1):
print("YES")
else:
if (tmp != cnt):
print("NO")
else:
print("YES")
|
cnt = cnt**1
| 12 |
operation
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__<'__main__':
main()
|
if __name__<'__main__':
| 15 |
decision
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]|n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
name = ["o"]|n
| 9 |
operation
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
z.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
z.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
| 4 |
statement
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__ == '__main__':
main()
|
def make_check_fibo():
fibonacci_numbers = [0, 1]
for i in range(2,18):
fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])
return fibonacci_numbers
def main():
n = int(input());
name = ["o"]*n
for i in range(1, len(name)+1):
if(i in make_check_fibo()):
name[i-1] = "O"
print(''.join(name));
if __name__<'__main__':
main()
|
if __name__<'__main__':
| 15 |
decision
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)-1] *= math.pow(x,k)
sum = 0
for a in As:
sum += int(a)
print(sum)
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)-1] *= math.pow(x,k)
sum = 34
for a in As:
sum += int(a)
print(sum)
|
sum = 34
| 11 |
value
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)-1] *= math.pow(x,k)
sum = 0
for a in As:
sum += int(a)
print(sum)
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)<<1] *= math.pow(x,k)
sum = 0
for a in As:
sum += int(a)
print(sum)
|
As[len(As)<<1] *= math.pow(x,k)
| 9 |
operation
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)-1] *= math.pow(x,k)
sum = 0
for a in As:
sum += int(a)
print(sum)
|
import math
ip = lambda:map(int,input().split())
n,k,x = ip()
As = list(ip())
As.sort()
As[len(As)^1] *= math.pow(x,k)
sum = 0
for a in As:
sum += int(a)
print(sum)
|
As[len(As)^1] *= math.pow(x,k)
| 9 |
operation
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2<0:
print('Agasa')
else:
print('Conan')
|
if count%2<0:
| 11 |
decision
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i<a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
if i<a[-1]:
| 9 |
decision
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2<0:
print('Agasa')
else:
print('Conan')
|
if count%2<0:
| 11 |
decision
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i<a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
if i<a[-1]:
| 9 |
decision
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count%2==0:
print('Agasa')
else:
print('Conan')
|
n = int(input())
s = input().split()
a = []
for i in s:
a.append(int(i))
a.sort()
count=0
for i in a[::-1]:
if i==a[-1]:
count+=1
if count**2==0:
print('Agasa')
else:
print('Conan')
|
if count**2==0:
| 11 |
operation
|
a,b=[int(i) for i in input().split()]
while a!=0 and b!=0:
if a>=2*b:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b)
|
a,b=[int(i) for i in input().split()]
while a!=0 and b!=0:
if x>=2*b:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b)
|
if x>=2*b:
| 3 |
statement
|
a,b=[int(i) for i in input().split()]
while a!=0 and b!=0:
if a>=2*b:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b)
|
a,b=[int(i) for i in input().split()]
while a!=0 and b!=0:
if a<=2*b:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b)
|
if a<=2*b:
| 3 |
decision
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.