Submission #225708

#TimeUsernameProblemLanguageResultExecution timeMemory
225708maomao90Popcount (COCI19_popcount)C++14
0 / 110
5 ms384 KiB
#include <cstdio> using namespace std; int N, K; int main() { scanf("%d%d", &N, &K); for (int i = 1; i <= N; i++) { if (i % 4 == 1) { if (i != 1) printf("A&((1<<%d)-1-(1<<%d)-1)\n", N + 1, i); printf("A="); } printf("(A&(1<<%d))>>%d+", i, i); } printf("A&((1<<%d)-1)\n", N / 4 * 4 + 1); return 0; }

Compilation message (stderr)

popcount.cpp: In function 'int main()':
popcount.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &N, &K);
     ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...