This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
N, K = map(int, input().split())
code = []
seg = 1
while seg < N:
mask = []
i = 0
p = 0
while i < N:
p |= ((1<<seg)-1) << i
i += 2*seg
p &= (1<<N)-1
q = (p<<seg) & ((1<<N)-1)
code.append('A=((A&{})+((A&{})>>{}))'.format(p,q,seg))
seg <<= 1
print(len(code))
for c in code:
print(c)
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |