#include <bits/stdc++.h>
#include <Annalib.h>
using namespace std;
typedef long long int ll;
typedef vector <int> vi;
void Anna(int n, ll x, int k, vi p){
int cont=0, i, bits=0;
for(i=0;i<n;i++){
if(cont<k && p[cont]==i){
cont++;
Set(i, 0);
continue;
}
if((1<<bits)>x) continue;
if(x&(1<<bits)){
if(cont<k && p[cont]==i+1){
Set(i, 0);
continue;
}
else{
Set(i, 1);
if(i<n-1) Set(i+1, 1);
i++;
}
}
else{
Set(i, 1);
if(i<n-1) Set(i+1, 0);
if(cont<k && p[cont]==i+1) cont++;
i++;
}
bits++;
}
}
int main(){
return (0);
}
#include <bits/stdc++.h>
#include <Brunolib.h>
using namespace std;
typedef vector <int> vi;
typedef long long int ll;
ll Bruno(int n, vi a){
ll x=0;
int bits=0;
for(int i=0;i<n;i++){
if(a[i]){
if(i==n-1 || a[i+1]) x+=(ll)(1<<bits);
i++;
bits++;
}
}
return (x);
}
int main(){
return (0);
}
Compilation message
/usr/bin/ld: /tmp/ccA8Xsib.o: in function `main':
grader_anna.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccNb6aZb.o:Anna.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccA8Xsib.o: in function `main':
grader_anna.c:(.text.startup+0x10b): undefined reference to `Anna(int, long long, int, int*)'
collect2: error: ld returned 1 exit status
/usr/bin/ld: /tmp/cciOCkSZ.o: in function `main':
grader_bruno.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccFOUEzX.o:Bruno.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cciOCkSZ.o: in function `main':
grader_bruno.cpp:(.text.startup+0x13d): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status