original_code
stringlengths
78
14.8k
modified_code
stringlengths
77
14.8k
changed_line
stringlengths
1
14.4k
number_of_line
int64
1
58
mutation_type
stringclasses
4 values
import math t=int(input()) while t>0: size,tap=map(int,input().split()) dp=[0 for _ in range(tap+1)] loc=list(map(int,input().split())) if tap==1: print(max(loc[0],size-loc[0]+1)) else: dp[1]=loc[0] for i in range(1,tap): dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1) dp[tap]=max(dp[tap],size-loc[tap-1]+1) for j in range(tap-2,-1): dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1)) print(max(dp)) t-=1
import math t=int(input()) while t>0: size,tap=map(int,input().split()) dp=[0 for _ in range(tap+1)] loc=list(map(int,input().split())) if tap==1: print(max(loc[0],size-loc[0]+77)) else: dp[1]=loc[0] for i in range(1,tap): dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1) dp[tap]=max(dp[tap],size-loc[tap-1]+1) for j in range(tap-2,-1): dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1)) print(max(dp)) t-=1
print(max(loc[0],size-loc[0]+77))
8
value
import math t=int(input()) while t>0: size,tap=map(int,input().split()) dp=[0 for _ in range(tap+1)] loc=list(map(int,input().split())) if tap==1: print(max(loc[0],size-loc[0]+1)) else: dp[1]=loc[0] for i in range(1,tap): dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1) dp[tap]=max(dp[tap],size-loc[tap-1]+1) for j in range(tap-2,-1): dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1)) print(max(dp)) t-=1
import math t=int(input()) while t>0: size,tap=map(int,input().split()) dp=[0 for _ in range(tap+1)] loc=list(map(int,input().split())) if tap<1: print(max(loc[0],size-loc[0]+1)) else: dp[1]=loc[0] for i in range(1,tap): dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1) dp[tap]=max(dp[tap],size-loc[tap-1]+1) for j in range(tap-2,-1): dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1)) print(max(dp)) t-=1
if tap<1:
7
decision
from collections import defaultdict n = int(input()) cnt = [0]*(n+20) ws = map(int,input().strip().split()) ans = 0 for w in ws: cnt[w]+=1 for i in range(1,len(cnt)-1): cnt[i+1] += cnt[i]//2 cnt[i] %= 2 ans += cnt[i] print(ans)
from collections import defaultdict n = int(input()) cnt = [0]*(n+20) ws = map(int,input().strip().split()) ans = 0 for w in ws: cnt[w]+=1 for i in range(1,len(cnt)-1): cnt[i+1] += cnt[i]%2 cnt[i] %= 2 ans += cnt[i] print(ans)
cnt[i+1] += cnt[i]%2
12
operation
from collections import defaultdict n = int(input()) cnt = [0]*(n+20) ws = map(int,input().strip().split()) ans = 0 for w in ws: cnt[w]+=1 for i in range(1,len(cnt)-1): cnt[i+1] += cnt[i]//2 cnt[i] %= 2 ans += cnt[i] print(ans)
from collections import defaultdict n = int(input()) cnt = [0]*(n+20) ws = map(int,input().strip().split()) ans = 0 for w in ws: cnt[w]+=1 for i in range(1,len(cnt)-1): cnt[x+1] += cnt[i]//2 cnt[i] %= 2 ans += cnt[i] print(ans)
cnt[x+1] += cnt[i]//2
12
statement
R=lambda:map(int,input().split()) n = int(input()) a = list(R()) a[:] = [ x - 1 for x in a] def solve1(): for i in range(n): if a[a[a[i]]] == i and a[i] != i and a[a[i]] != a[i] and a[a[i]] != i: print ('YES') return print ('NO') solve1()
R=lambda:map(int,input().split()) n = int(input()) a = list(R()) a[:] = [ x - 1 for x in a] def solve1(): for i in range(n): if a[a[a[i]]] == i and y[i] != i and a[a[i]] != a[i] and a[a[i]] != i: print ('YES') return print ('NO') solve1()
if a[a[a[i]]] == i and y[i] != i and a[a[i]] != a[i] and a[a[i]] != i:
11
statement
R=lambda:map(int,input().split()) n = int(input()) a = list(R()) a[:] = [ x - 1 for x in a] def solve1(): for i in range(n): if a[a[a[i]]] == i and a[i] != i and a[a[i]] != a[i] and a[a[i]] != i: print ('YES') return print ('NO') solve1()
R=lambda:map(int,input().split()) n = int(input()) a = list(R()) a[:] = [ x - 1 for x in a] def solve1(): for i in range(n): if a[a[a[i]]]<i and a[i] != i and a[a[i]] != a[i] and a[a[i]] != i: print ('YES') return print ('NO') solve1()
if a[a[a[i]]]<i and a[i] != i and a[a[i]] != a[i] and a[a[i]] != i:
11
decision
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]>>p1: time=k[i]-p1 print(time)
if time<k[i]>>p1:
11
operation
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]&p1: time=k[i]-p1 print(time)
if time<k[i]&p1:
11
operation
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=x-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
time=x-k[i]
9
statement
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time>k[i]-p1: time=k[i]-p1 print(time)
if time>k[i]-p1:
11
decision
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2-k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
n=int(input()) p1=1 p2=1000000 time=0 k=list(map(int,input().split())) for i in range(len(k)): if k[i]>=500001: if time<p2-k[i]: time=p2/k[i] else: if time<k[i]-p1: time=k[i]-p1 print(time)
time=p2/k[i]
9
operation
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 6: print('Agasa') else: print('Conan')
elif cnt == n and cnt % 2 == 6:
7
value
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt<n and cnt % 2 == 0: print('Agasa') else: print('Conan')
elif cnt<n and cnt % 2 == 0:
7
decision
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n<1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
if n<1:
5
decision
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt&2 == 0: print('Agasa') else: print('Conan')
elif cnt == n and cnt&2 == 0:
7
operation
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt % 2 == 0: print('Agasa') else: print('Conan')
n = int(input()) a = list(map(int, input().split())) mx = max(a) cnt = a.count(mx) if n == 1: print('Conan') elif cnt == n and cnt@2 == 0: print('Agasa') else: print('Conan')
elif cnt == n and cnt@2 == 0:
7
operation
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k<=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
elif k<=n:
9
decision
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k<=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
elif k<=n:
9
decision
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k@1: print("Yes") else: print("No")
if i==k@1:
15
operation
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==1: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
n,k=map(int,input().split()) if n==1 or k==1: if n==1 and k==100: print("Yes") elif n==1: print("No") else: print("Yes") elif k>=n: print("No") else: i=1 while i<=k and n%i==i-1: i+=1 if i==k+1: print("Yes") else: print("No")
if n==1 and k==100:
3
value
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 81 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
cost = 81
9
value
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min&a[i] print(cost)
cost += cur_min&a[i]
13
operation
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.z(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
a.z(x)
5
statement
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min * a[i] print(cost)
n = int(input()) a, p = [], [] for _ in range(n): x,y = map(int, input().split()) a.append(x) p.append(y) cur_min = float('inf') cost = 0 for i in range(n): cur_min = min(cur_min, p[i]) cost += cur_min>>a[i] print(cost)
cost += cur_min>>a[i]
13
operation
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first == second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first<second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
return first<second
18
decision
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first == second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first<second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
return first<second
18
decision
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first == second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
from sys import stdin, stdout from random import randrange def check(first, second): first = first.lower() second = second.lower() first = first.replace('0', 'o') second = second.replace('0', 'o') first = first.replace('1', 'l') second = second.replace('1', 'l') first = first.replace('i', 'l') second = second.replace('i', 'l') return first<second s = stdin.readline().strip() n = int(stdin.readline()) label = 0 for i in range(n): f = stdin.readline().strip() if check(f, s): label = 1 if label: stdout.write('No') else: stdout.write('Yes')
return first<second
18
decision
number = int(input()) scoreArray = list(map(int,input().split())) A = set(scoreArray) ans = 0 for i in A: if i==0: continue else: ans+=1 print(ans)
number = int(input()) scoreArray = list(map(int,input().split())) A = set(scoreArray) ans = 0 for i in A: if z==0: continue else: ans+=1 print(ans)
if z==0:
6
statement
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, z = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
a, z = b, a%b
5
statement
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k==50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
if(k==50):
13
decision
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10<0): print("yes") else: print("no")
if((((n+1) / ans)*10)%10<0):
19
decision
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a|b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
a, b = b, a|b
5
operation
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10 == 0): print("yes") else: print("no")
n, k = [int(i) for i in input().split()] def gcd(a, b): while(b != 0): a, b = b, a%b return a def lcm(a, b): return a*b/gcd(a, b) ans = 1 if(k > 50): print("no") else: for i in range(2, k): ans = lcm(ans, i) if((((n+1) / ans)*10)%10<0): print("yes") else: print("no")
if((((n+1) / ans)*10)%10<0):
19
decision
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)&int(B))
print(int(A)&int(B))
10
operation
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
q = input().split(' ',2) a = input().x(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
a = input().x(' ',2)
2
statement
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) z =max(b) print(int(A)*int(B))
z =max(b)
9
statement
q = input().split(' ',2) a = input().split(' ',2) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
q = input().split(' ',2) a = input().split(' ',145) b = input().split(' ',2) for x in range(len(a)): a[x] = int(a[x]) for x in range(len(b)): b[x] = int(b[x]) A = min(a) B =max(b) print(int(A)*int(B))
a = input().split(' ',145)
2
value
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1]==j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
if (i[0] < j[0] and i[1]==j[1]):
12
decision
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[95] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
if (i[0] <= j[0] and i[95] <= j[1]):
17
value
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1]==j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
if (i[0] < j[0] and i[1]==j[1]):
12
decision
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1]&i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
if max_v == i[0] * i[1]&i[2]:
30
operation
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1] * i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
n = int(input()); cake = [] for i in range(n): tmp = sorted(list(map(int, input().split()))) tmp.append(0) cake.append(tmp) new_cake =[] for i in cake: for j in cake: if (i[0] > j[0] and i[1] < j[1]): new_cake.append([min(i[0], j[0]), i[1], 0]) if (i[0] < j[0] and i[1] > j[1]): new_cake.append([i[0], min(i[1], j[1]), 0]) for i in cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 new_cake = list(set(new_cake)) for i in new_cake: for j in cake: if (i[0] <= j[0] and i[1] <= j[1]): i[2] += 1 cake.extend(new_cake) max_v = 0 cur_i = [] for i in cake: max_v = max(max_v, i[0] * i[1]<<i[2]) if max_v == i[0] * i[1] * i[2]: cur_i = i print(max_v) print(cur_i[0], ' ', cur_i[1])
max_v = max(max_v, i[0] * i[1]<<i[2])
29
operation
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3]<=3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
if d[3]<=3:
25
decision
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[40] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
if d[40] >= 3:
25
value
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2]<=1 and d[4] >= 2: return 'YES' return 'NO' print(main())
if d[2]<=1 and d[4] >= 2:
27
decision
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4]<=2: return 'YES' return 'NO' print(main())
if d[2] >= 1 and d[4]<=2:
27
decision
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2] >= 2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**15 mod = 10**9+7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def pf(s): return print(s, flush=True) def main(): a = LI() d = collections.Counter(a) if d[1] >= 1: return 'YES' if d[2]<=2: return 'YES' if d[3] >= 3: return 'YES' if d[2] >= 1 and d[4] >= 2: return 'YES' return 'NO' print(main())
if d[2]<=2:
23
decision
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - z)
print(len(path) - z)
12
statement
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
n = input() path = z() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
path = z()
2
statement
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i*2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
if path[i:i*2] in ("RU", "UR"):
7
operation
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
n = input() path = input() subs = 0 i = 0 while i < len(path)%1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
while i < len(path)%1:
6
operation
n = input() path = input() subs = 0 i = 0 while i < len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
n = input() path = input() subs = 0 i = 0 while i>len(path) - 1: if path[i:i+2] in ("RU", "UR"): subs += 1 i += 1 i += 1 print(len(path) - subs)
while i>len(path) - 1:
6
decision
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]<=0: b+=arr[i] else: c+=arr[i] print(b-c)
if arr[i]<=0:
6
decision
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b+c)
print(b+c)
10
operation
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
x=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
x=int(input())
1
statement
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b@c)
print(b@c)
10
operation
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]>=0: b+=arr[i] else: c+=arr[i] print(b-c)
n=int(input()) arr=[int(x) for x in input().split()] c=0 b=0 for i in range(0,n): if arr[i]<=0: b+=arr[i] else: c+=arr[i] print(b-c)
if arr[i]<=0:
6
decision
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm&m))//x) main()
print(((hh-h)*60+(mm&m))//x)
20
operation
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[80]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
m=int(l[80])
11
value
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60@(mm-m))//x) main()
print(((hh-h)*60@(mm-m))//x)
20
operation
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh//h)*60+(mm-m))//x) main()
print(((hh//h)*60+(mm-m))//x)
20
operation
def judge(s): for i in s: if i=='7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
def judge(s): for i in s: if i<'7': return True return False def main(): x=int(input()) l=input().split() h=int(l[0]) hh=h m=int(l[1]) mm=m while True: if judge(str(m)) or judge(str(h)): break m-=x if m<0: m+=60 h-=1 print(((hh-h)*60+(mm-m))//x) main()
if i<'7':
3
decision
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(y(p))**2==p: continue else: print(p) break
if int(y(p))**2==p:
10
statement
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2<p: continue else: print(p) break
if int(sqrt(p))**2<p:
10
decision
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
from math import sqrt n=int(input()) a=[int(x) for z in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
a=[int(x) for z in input().split()]
3
statement
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2<p: continue else: print(p) break
if int(sqrt(p))**2<p:
10
decision
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2==p: continue else: print(p) break
from math import sqrt n=int(input()) a=[int(x) for x in input().split()] a.sort(reverse=True) if a[0]<0 : print(a[0]) else: for i in range(len(a)): p=a[i] if int(sqrt(p))**2<p: continue else: print(p) break
if int(sqrt(p))**2<p:
10
decision
lines = [] line1 = input() line2=int(input()) for i in range(line2): line=input() lines.append(line) print(lines) suggested_login=line1 num_of_log=line2 existing_logins=lines.copy() for existing_login in existing_logins: if(suggested_login.upper()==existing_login.upper()): print("No") quit() x1=existing_login.upper().replace('0', 'O') x2=existing_login.upper().replace('O', '0') if(x1==suggested_login or x2==suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').lower() y2 = existing_login.replace('1', 'I').lower() y3 = existing_login.replace('l', '1').lower() y4 = existing_login.replace('l', 'I').lower() y5 = existing_login.replace('I', '1').lower() y6 = existing_login.replace('I', 'l').lower() if (y1 == suggested_login or y2 == suggested_login or y3 ==suggested_login or y4 == suggested_login or y5==suggested_login or y6== suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').upper() y2 = existing_login.replace('1', 'I').upper() y3 = existing_login.replace('l', '1').upper() y4 = existing_login.replace('l', 'I').upper() y5 = existing_login.replace('I', '1').upper() y6 = existing_login.replace('I', 'l').upper() print(y1) print(y2) print(y3) print(y4) print(y5) print(y6) if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == suggested_login.upper() or y5==suggested_login.upper() or y6== suggested_login.upper()): print("No") quit() print("Yes")
lines = [] line1 = input() line2=int(input()) for i in range(line2): line=input() lines.append(line) print(lines) suggested_login=line1 num_of_log=line2 existing_logins=lines.copy() for existing_login in existing_logins: if(suggested_login.upper()==existing_login.upper()): print("No") quit() x1=existing_login.upper().replace('0', 'O') x2=existing_login.upper().replace('O', '0') if(x1==suggested_login or x2==suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').lower() y2 = existing_login.replace('1', 'I').lower() y3 = existing_login.replace('l', '1').lower() y4 = existing_login.replace('l', 'I').lower() y5 = existing_login.replace('I', '1').lower() y6 = existing_login.replace('I', 'l').lower() if (y1 == suggested_login or y2 == suggested_login or y3 ==suggested_login or y4 == suggested_login or y5==suggested_login or y6== suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').upper() y2 = existing_login.replace('1', 'I').upper() y3 = existing_login.replace('l', '1').upper() y4 = existing_login.replace('l', 'I').upper() y5 = existing_login.replace('I', '1').upper() y6 = existing_login.replace('I', 'l').upper() print(y1) print(y2) print(y3) print(y4) print(y5) print(y6) if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == suggested_login.upper() or y5<suggested_login.upper() or y6== suggested_login.upper()): print("No") quit() print("Yes")
if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == suggested_login.upper() or y5<suggested_login.upper() or y6== suggested_login.upper()):
50
decision
lines = [] line1 = input() line2=int(input()) for i in range(line2): line=input() lines.append(line) print(lines) suggested_login=line1 num_of_log=line2 existing_logins=lines.copy() for existing_login in existing_logins: if(suggested_login.upper()==existing_login.upper()): print("No") quit() x1=existing_login.upper().replace('0', 'O') x2=existing_login.upper().replace('O', '0') if(x1==suggested_login or x2==suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').lower() y2 = existing_login.replace('1', 'I').lower() y3 = existing_login.replace('l', '1').lower() y4 = existing_login.replace('l', 'I').lower() y5 = existing_login.replace('I', '1').lower() y6 = existing_login.replace('I', 'l').lower() if (y1 == suggested_login or y2 == suggested_login or y3 ==suggested_login or y4 == suggested_login or y5==suggested_login or y6== suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').upper() y2 = existing_login.replace('1', 'I').upper() y3 = existing_login.replace('l', '1').upper() y4 = existing_login.replace('l', 'I').upper() y5 = existing_login.replace('I', '1').upper() y6 = existing_login.replace('I', 'l').upper() print(y1) print(y2) print(y3) print(y4) print(y5) print(y6) if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == suggested_login.upper() or y5==suggested_login.upper() or y6== suggested_login.upper()): print("No") quit() print("Yes")
lines = [] line1 = input() line2=int(input()) for i in range(line2): line=input() lines.append(line) print(lines) suggested_login=line1 num_of_log=line2 existing_logins=lines.copy() for existing_login in existing_logins: if(suggested_login.upper()==existing_login.upper()): print("No") quit() x1=existing_login.upper().replace('0', 'O') x2=existing_login.upper().replace('O', '0') if(x1==suggested_login or x2==suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').lower() y2 = existing_login.replace('1', 'I').lower() y3 = existing_login.replace('l', '1').lower() y4 = existing_login.replace('l', 'I').lower() y5 = existing_login.replace('I', '1').lower() y6 = existing_login.replace('I', 'l').lower() if (y1 == suggested_login or y2 == suggested_login or y3 ==suggested_login or y4 == suggested_login or y5==suggested_login or y6== suggested_login): print("No") quit() y1 = existing_login.replace('1', 'l').upper() y2 = existing_login.replace('1', 'I').upper() y3 = existing_login.replace('l', '1').upper() y4 = existing_login.replace('l', 'I').upper() y5 = existing_login.replace('I', '1').upper() y6 = existing_login.replace('I', 'l').upper() print(y1) print(y2) print(y3) print(y4) print(y5) print(y6) if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == y.upper() or y5==suggested_login.upper() or y6== suggested_login.upper()): print("No") quit() print("Yes")
if (y1 == suggested_login.upper() or y2 == suggested_login.upper() or y3 ==suggested_login.upper() or y4 == y.upper() or y5==suggested_login.upper() or y6== suggested_login.upper()):
50
statement
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l>r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
if l>r:
5
decision
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
x = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
x = input().split(" ")
1
statement
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2<<r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
print(2<<r + (l - r) // 2 * 2)
10
operation
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r**(l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
print(2 * r**(l - r) // 2 * 2)
10
operation
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2 * l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
arr = input().split(" ") l = int(arr[0]) r = int(arr[1]) a = int(arr[2]) if l < r: l += a if l <= r: print(2*l) else: print(2 * r + (l - r) // 2 * 2) else: r += a if r <= l: print(2 * r) else: print(2 * l + (r - l) // 2 * 2)
print(2*l)
8
operation
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps<=t: i=i+t-temps break i=i+1 print(i+1)
if temps<=t:
22
decision
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i<=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
if i<=(n*d):
20
decision
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(z*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
if i>=(z*k) and i<=(n*d):
12
statement
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: z+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
z+=0.5
17
statement
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*k) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
k,d,t=map(int,input().split()) temps=0 i=0 n=1 m=1 if k>=t: print(t+0.0) elif k%d==0: print(t+0.0) else: while 1: if i>=(m*k) and i<=(n*d): if i==(n*d): temps+=1 m=m+1 else: temps+=0.5 elif i<(m*x) : temps+=1 if i>=(n*d): n=n+1 if temps>=t: i=i+t-temps break i=i+1 print(i+1)
elif i<(m*x) :
18
statement
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) y = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
y = []
33
statement
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][12] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
maxi = rs((clocks[0][12] + 24, clocks[0][1]), clocks[-1])
41
value
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[y + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
maxi = check(clocks[y + 1], clocks[i], maxi)
44
statement
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[170] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
res[1] = t1[1] - t2[170] + 60 - 1
4
value
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0] - t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
def rs(t1, t2): res = [0, 0] if t1[1] - t2[1] < 0: res[1] = t1[1] - t2[1] + 60 - 1 res[0] -= 1 else: res[1] = t1[1] - t2[1] - 1 res[0] += t1[0]-t2[0] return tuple(res) def check(t1, t2, maxi): tmp = rs(t1, t2) if tmp[0] > maxi[0]: return tmp elif tmp[0] == maxi[0]: if tmp[1] > maxi[1]: return tmp return maxi def to_str(item): if item < 10: return '0' + str(item) else: return str(item) n = int(input()) clocks = [] for i in range(n): clocks.append(tuple(map(int, input().split(':')))) clocks = sorted(clocks, key=lambda item: (item[0], item[1])) if n == 1: print('23:59') else: maxi = rs((clocks[0][0] + 24, clocks[0][1]), clocks[-1]) i = 0 while i < len(clocks) - 1: maxi = check(clocks[i + 1], clocks[i], maxi) i += 1 print(":".join(map(to_str, maxi)))
res[0] += t1[0]-t2[0]
9
operation
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 97] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
f2 = l[f1 - 97]
7
value
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 77] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
f1 = l[i - 77]
6
value
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 36] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
f1 = l[i - 36]
6
value
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i<f2: triangle = True break if triangle: print("YES") else: print("NO")
if i<f2:
8
decision
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i<f2: triangle = True break if triangle: print("YES") else: print("NO")
if i<f2:
8
decision
n=int(input()) s=input() if s[0]=="U": x=0 y=1 prev="up" else: x=1 y=0 prev="down" coin = 0 curr=prev if n>1: for i in range(1,len(s)): if s[i]=="U": y+=1 if x>y: curr="down" elif x<y: curr="up" else: x+=1 if x>y: curr="down" elif x<y: curr="up" if curr!=prev: coin+=1 prev=curr print(coin)
n=int(input()) s=input() if s[0]=="U": x=0 y=1 prev="up" else: x=1 y=0 prev="down" coin = 0 curr=prev if n>1: for i in range(1,len(s)): if s[i]=="U": y+=1 if x==y: curr="down" elif x<y: curr="up" else: x+=1 if x>y: curr="down" elif x<y: curr="up" if curr!=prev: coin+=1 prev=curr print(coin)
if x==y:
17
decision
n=int(input()) s=input() if s[0]=="U": x=0 y=1 prev="up" else: x=1 y=0 prev="down" coin = 0 curr=prev if n>1: for i in range(1,len(s)): if s[i]=="U": y+=1 if x>y: curr="down" elif x<y: curr="up" else: x+=1 if x>y: curr="down" elif x<y: curr="up" if curr!=prev: coin+=1 prev=curr print(coin)
n=int(input()) x=input() if s[0]=="U": x=0 y=1 prev="up" else: x=1 y=0 prev="down" coin = 0 curr=prev if n>1: for i in range(1,len(s)): if s[i]=="U": y+=1 if x>y: curr="down" elif x<y: curr="up" else: x+=1 if x>y: curr="down" elif x<y: curr="up" if curr!=prev: coin+=1 prev=curr print(coin)
x=input()
2
statement
def solve(n, m): if n > 64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
def solve(n, m): if n==64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
if n==64:
2
decision
def solve(n, m): if n > 64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
def solve(n, m): if n > 64: return m x = pow(2, n) return m//x a = int(input()) b = int(input()) print(solve(a, b))
return m//x
5
operation
def solve(n, m): if n > 64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
def solve(n, m): if n > 64: return m x = pow(2, n) return m%x a = int(input()) b = int(input()) print(solve(a, b))
return m%x
5
operation
def solve(n, m): if n > 64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
def solve(n, m): if n > 64: return m x = pow(2, n) return m*x a = int(input()) b = int(input()) print(solve(a, b))
return m*x
5
operation
def solve(n, m): if n > 64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
def solve(n, m): if n==64: return m x = pow(2, n) return m % x a = int(input()) b = int(input()) print(solve(a, b))
if n==64:
2
decision
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x<y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
elif x<y:
18
decision
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x==y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
if x==y:
14
decision
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x<y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
elif x<y:
18
decision
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x > y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
n, m = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] mult = 1 mod = 10 ** 9 + 7 res = 0 m_inv = pow(m, mod - 2, mod) for x, y in zip(a, b): if x and y: if x==y: res += mult res %= mod break elif x == y: continue else: break elif x: res += mult * (x-1) * m_inv % mod res %= mod mult = mult * m_inv % mod elif y: res += mult * (m - y) * m_inv % mod res %= mod mult = mult * m_inv % mod else: res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod res %= mod mult = mult * m_inv % mod print(res)
if x==y:
14
decision