답안 #1034670

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1034670 2024-07-25T16:31:47 Z adaawf Broken Device (JOI17_broken_device) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
void Anna(int N, long long int X, int K, int P[]) {
    set<int> s;
    for (int i = 0; i < K; i++) {
        s.insert(P[i]);
    }
    for (int i = 0; i < N; i++) {
        if ((X & (1ll << (i % 60))) && !s.count(i)) {
            Set(i, 1);
        }
        else {
            Set(i, 0);
        }
    }
}
#include <bits/stdc++.h>
using namespace std;
int dd[65];
long long int Bruno(int N, int A[]) {
    for (int i = 0; i < 61; i++) dd[i] = 0;
    for (int i = 0; i < N; i++) {
        if (A[i] == 1) {
            dd[i % 60] = 1;
        }
    }
    long long int res = 0;
    for (int i = 0; i < 60; i++) {
        if (dd[i] == 1) {
            res += (1ll << i);
        }
    }
    return res;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:10:13: error: 'Set' was not declared in this scope
   10 |             Set(i, 1);
      |             ^~~
Anna.cpp:13:13: error: 'Set' was not declared in this scope
   13 |             Set(i, 0);
      |             ^~~