Submission #1154637

#TimeUsernameProblemLanguageResultExecution timeMemory
1154637YSH2020Broken Device (JOI17_broken_device)C++20
Compilation error
0 ms0 KiB
void Anna( int N, long long X, int K, int P[] ) {
    for (int i = 0; i < 60; i++) {
        if (X&(1<<i) > 0) Set(i, 1);
        else Set(i, 0);
    }
    for (int i = 0; i < 60; i++) {
        if (X&(1<<i) > 0) Set(i+60, 1);
        else Set(i+60, 0);
    }
}

long long Bruno( int N, int A[] ) {
    long long ans = 0;
    for (int i = 0; i < 120; i++) {
        if (A[i] == 1) {
            ans = ans|(1<<(i%60));
        }
    }
    return ans;
}

Compilation message (stderr)

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:3:27: error: 'Set' was not declared in this scope
    3 |         if (X&(1<<i) > 0) Set(i, 1);
      |                           ^~~
Anna.cpp:4:14: error: 'Set' was not declared in this scope
    4 |         else Set(i, 0);
      |              ^~~
Anna.cpp:7:27: error: 'Set' was not declared in this scope
    7 |         if (X&(1<<i) > 0) Set(i+60, 1);
      |                           ^~~
Anna.cpp:8:14: error: 'Set' was not declared in this scope
    8 |         else Set(i+60, 0);
      |              ^~~