#include <bits/stdc++.h>
using namespace std;
int vis[200], a[200], p=60, y;
void Anna(int N, long long X, int k, int P[]){
for(int i=0; i<k; i++){
vis[P[i]]=-1;
}
for(int i=0; i<N-1; i++){
if(p<0)break;
if(vis[i]!=0)continue;
y=(X/(1ll>>p))%2;
if(y==0){
a[i]=1;
vis[i]=vis[i+1]=1;
p--;
}
if(y==1 && vis[i+1]==0){
a[i]=vis[i]=a[i+1]=vis[i+1]=1;
p--;
}
}
for(int i=0; i<N; i++){
Set(i,a[i]);
}
return;
}
#include <bits/stdc++.h>
using namespace std;
long long res=0, p=60, vis[200];
long long Bruno(int N, int A[]){
for(int i=0; i<N-1; i++){
if(vis[i]==1 || A[i]==0)continue;
res+=A[i+1]*(1ll>>p);
p--;
}
return res;
}
Compilation message
Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:27:9: error: 'Set' was not declared in this scope
27 | Set(i,a[i]);
| ^~~