# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
517317 |
2022-01-23T03:19:05 Z |
KoD |
Popcount (COCI19_popcount) |
Python 3 |
|
16 ms |
2844 KB |
n, m = map(int, input().split())
k = 1
ans=[]
while k < n:
s = ''
while len(s) < n:
s += '1' * k
s += '0' * k
b = int((s[:n])[::-1], 2)
ans.append('A=((A&{})+((A>>{})&{}))'.format(b, k, b))
k *= 2
print(len(ans))
print(*ans,sep='\n')
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2764 KB |
Accepted. |
2 |
Correct |
14 ms |
2768 KB |
Accepted. |
3 |
Correct |
13 ms |
2832 KB |
Accepted. |
4 |
Correct |
13 ms |
2760 KB |
Accepted. |
5 |
Correct |
13 ms |
2824 KB |
Accepted. |
6 |
Correct |
12 ms |
2756 KB |
Accepted. |
7 |
Correct |
13 ms |
2828 KB |
Accepted. |
8 |
Correct |
13 ms |
2732 KB |
Accepted. |
9 |
Correct |
12 ms |
2768 KB |
Accepted. |
10 |
Correct |
13 ms |
2744 KB |
Accepted. |
11 |
Correct |
13 ms |
2820 KB |
Accepted. |
12 |
Correct |
12 ms |
2768 KB |
Accepted. |
13 |
Correct |
13 ms |
2768 KB |
Accepted. |
14 |
Correct |
13 ms |
2844 KB |
Accepted. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
2764 KB |
Accepted. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
13 ms |
2764 KB |
Incorrect number of commands. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2740 KB |
Accepted. |
2 |
Correct |
13 ms |
2768 KB |
Accepted. |
3 |
Correct |
14 ms |
2768 KB |
Accepted. |
4 |
Correct |
12 ms |
2732 KB |
Accepted. |
5 |
Correct |
14 ms |
2768 KB |
Accepted. |
6 |
Correct |
15 ms |
2752 KB |
Accepted. |
7 |
Correct |
14 ms |
2772 KB |
Accepted. |
8 |
Correct |
13 ms |
2768 KB |
Accepted. |
9 |
Correct |
13 ms |
2768 KB |
Accepted. |
10 |
Correct |
13 ms |
2828 KB |
Accepted. |
11 |
Correct |
13 ms |
2768 KB |
Accepted. |
12 |
Correct |
14 ms |
2840 KB |
Accepted. |