Submission #250529

# Submission time Handle Problem Language Result Execution time Memory
250529 2020-07-18T09:01:27 Z dvdg6566 Popcount (COCI19_popcount) Python 3
0 / 110
30 ms 3320 KB
A=[int(x) for x in input().split(' ')]
N=A[0]
M=A[1]
X=[]	
ml=0
for x in range(M):
	A=0
	B=0
	for i in range(N):
		if((2**ml)&i): A+=2**i
		else:B+=2**i

	ml+=1
	X.append("A=(((A&"+str(A)+")>>"+str(ml)+")+(A&"+str(B)+'))')
	if(2**ml>=N):break

print(len(X))
for i in X:
	print(i)
# Verdict Execution time Memory Grader output
1 Correct 19 ms 3300 KB Accepted.
2 Correct 20 ms 3308 KB Accepted.
3 Correct 19 ms 3300 KB Accepted.
4 Incorrect 20 ms 3308 KB Wrong answer.
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 3320 KB Wrong answer.
# Verdict Execution time Memory Grader output
1 Correct 20 ms 3304 KB Accepted.
2 Incorrect 19 ms 3308 KB Wrong answer.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 3308 KB Wrong answer.
2 Halted 0 ms 0 KB -