답안 #199767

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
199767 2020-02-03T08:54:24 Z SamAnd Popcount (COCI19_popcount) C++17
15 / 110
6 ms 376 KB
#include <bits/stdc++.h>
using namespace std;

int n, k;

void solv1()
{
    cout << k << endl;
    for (int i = 1; i <= k; ++i)
    {
        /*string ii;
        string s;
        string ast = "(1<<" + ii + ")";
        s = "A";
        s = "(" + s + "-" + ast + ")";
        s = "(" + s + "+" + ast + ")";*/
        cout << "A=((A-(A&";
        cout << "(1<<" << i << ")))";
        cout << "+((A&";
        cout << "(1<<" << i << "))";
        cout << ">>" << i << "))\n";
    }
}

int main()
{
    cin >> n >> k;
    if (2 <= n && n <= 100 && k == n - 1)
        solv1();
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 376 KB Accepted.
2 Correct 5 ms 376 KB Accepted.
3 Correct 5 ms 256 KB Accepted.
4 Correct 5 ms 256 KB Accepted.
5 Correct 5 ms 256 KB Accepted.
6 Correct 6 ms 376 KB Accepted.
7 Correct 6 ms 376 KB Accepted.
8 Correct 6 ms 376 KB Accepted.
9 Correct 5 ms 256 KB Accepted.
10 Correct 5 ms 256 KB Accepted.
11 Correct 6 ms 376 KB Accepted.
12 Correct 5 ms 256 KB Accepted.
13 Correct 5 ms 376 KB Accepted.
14 Correct 5 ms 376 KB Accepted.
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Wrong output format.
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 376 KB Wrong output format.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 376 KB Wrong output format.
2 Halted 0 ms 0 KB -