Submission #1034670

#TimeUsernameProblemLanguageResultExecution timeMemory
1034670adaawfBroken Device (JOI17_broken_device)C++17
Compilation error
0 ms0 KiB
#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 (stderr)

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);
      |             ^~~