#include <bits/stdc++.h>
using namespace std;
#include "Annalib.h"
void Anna (int N, long long X, int K, int P[]) {
bool fuc[N+5], init;
int pre[N+5], b;
string rep[4] = {"101010010101010101011010100110010110100110011001100101011001100101100101101001101001101001010110011010101010011010011010011001101001101001010110101001", "010101101010101010100101011001101001011001100110011010100110011010011010010110010110010110101001100101010101100101100101100110010110010110101001010110", "100110101001101010101001100110010110011010101001100101010101010101011001101010010101010110010110101001010101100101101001011001100101010101100101100110", "011001010110010101010110011001101001100101010110011010101010101010100110010101101010101001101001010110101010011010010110100110011010101010011010011001"};
memset(fuc, 1, sizeof fuc);
for (int i = 0; i < K; i++) fuc[P[i]] = 0;
for (int s = 0; s < 4; s++) {
init = 0;
b = 0;
for (int i = 0; i < N; i++) {
if (!fuc[i]) pre[i] = 0;
else if (!init && i % 4 == s) pre[i] = 1, init = 1;
else if (!init) pre[i] = 0;
else if (b == 60) pre[i] = 0;
else if (((1ll << b) & X) == 0 && rep[s][i % (int)rep[s].length()] == '1') pre[i] = 0;
else if (((1ll << b) & X) > 0 && rep[s][i % (int)rep[s].length()] == '0') pre[i] = 0;
else pre[i] = 1, b++;
}
if (b == 60) {
for (int i = 0; i < N; i++) Set(i, pre[i]);
return;
}
}
for (int i = 0; i < N; i++) Set(i, pre[i]);
}
#include <bits/stdc++.h>
using namespace std;
#include "Brunolib.h"
long long Bruno (int N, int A[]) {
string rep[4] = {"101010010101010101011010100110010110100110011001100101011001100101100101101001101001101001010110011010101010011010011010011001101001101001010110101001", "010101101010101010100101011001101001011001100110011010100110011010011010010110010110010110101001100101010101100101100101100110010110010110101001010110", "100110101001101010101001100110010110011010101001100101010101010101011001101010010101010110010110101001010101100101101001011001100101010101100101100110", "011001010110010101010110011001101001100101010110011010101010101010100110010101101010101001101001010110101010011010010110100110011010101010011010011001"};
long long V = 0;
int s = -1;
int b = 0;
for (int i = 0; i < N; i++) {
if (A[i] == 1) {
if (s == -1) s = i % 4;
else if (rep[s][i % (int)rep[s].length()] == '1') V += (1ll << b), b++;
else b++;
}
}
return V;
}
Compilation message
Compilation message
Bruno.cpp:22:1: error: 'Compilation' does not name a type
Compilation message
^~~~~~~~~~~