Submission #1262005

#TimeUsernameProblemLanguageResultExecution timeMemory
1262005Szymon_PilipczukBroken Device (JOI17_broken_device)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define st first #define nd second #define pb push_back #define all(a) a.begin(),a.end() #define rep(a,b) for(int a = 0;a<b;a++) const int inf = 1e9; const ll infl = 1e18; void Anna(int n, ll x,int k,int p[]) { int i =0; int j = 0; while(i < n) { if(j == k || p[j] > i+2) { Set(i,1); Set(i+1,x%2); x/=2; Set(i+2,x%2); x/=2; i+=3; } else { if(p[j] == i) { j++; } Set(i,0); i++; } } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define st first #define nd second #define pb push_back #define all(a) a.begin(),a.end() #define rep(a,b) for(int a = 0;a<b;a++) const int inf = 1e9; const ll infl = 1e18; ll Bruno(int n,int a[]) { int j = 0; ll ans = 0; int i = 0; while(i < n) { if(a[i] == 1) { ans += (1LL<<j) * a[i+1]; j++; ans += (1LL<<j) * a[i+2]; i+=3; } else { i++; } } return ans; }

Compilation message (stderr)

# 1번째 컴파일 단계

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