Submission #225708

# Submission time Handle Problem Language Result Execution time Memory
225708 2020-04-21T11:18:24 Z maomao90 Popcount (COCI19_popcount) C++14
0 / 110
5 ms 384 KB
#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

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 time Memory Grader output
1 Incorrect 4 ms 256 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Wrong output format.
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Wrong output format.
2 Halted 0 ms 0 KB -