#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define ALL(v) (v).begin(), (v).end()
#define MASK(i) (1LL << (i))
#define GETBIT(mask, i) (((mask) >> (i)) & 1)
// mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng(1);
ll rngesus(ll l, ll r){return ((ull) rng()) % (r - l + 1) + l;}
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll LASTBIT(ll mask){return mask & (-mask);}
ll pop_cnt(ll mask){return __builtin_popcountll(mask);}
ll ctz(ll mask){return __builtin_ctzll(mask);}
ll clz(ll mask){return __builtin_clzll(mask);}
ll logOf(ll mask){return 63 - clz(mask);}
template <class T1, class T2>
bool minimize(T1 &a, T2 b){
if (a > b){a = b; return true;}
return false;
}
template <class T1, class T2>
bool maximize(T1 &a, T2 b){
if (a < b){a = b; return true;}
return false;
}
template <class T>
void printArr(T& a, string separator = " ", string finish = "\n", ostream& out = cout){
for(auto i: a) out << i << separator;
out << finish;
}
template <class T>
void remove_dup(vector<T> &a){
sort(ALL(a));
a.resize(unique(ALL(a)) - a.begin());
}
void Anna(int n, ll X, int k, int p[]){
vector<bool> a(n);
vector<bool> sigma(n);
for(int i = 0; i<k; ++i) a[p[i]] = 1;
int j = 0;
for(int i = 0; i<60; ++i){
while(j < n && (a[j] == 1 || a[j+1] == 1)) j++;
if (j >= n) break;
sigma[j] = 1;
sigma[j+1] = GETBIT(X, i);
j += 2;
}
// printArr(sigma);
for(int j = 0; j < n; ++j) Set(j, sigma[j]);
}
// int main(void){
// ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// int p[] = {0};
// Anna(150, 69420, 1, p);
// return 0;
// }
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define ALL(v) (v).begin(), (v).end()
#define MASK(i) (1LL << (i))
#define GETBIT(mask, i) (((mask) >> (i)) & 1)
// mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng(1);
ll rngesus(ll l, ll r){return ((ull) rng()) % (r - l + 1) + l;}
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll LASTBIT(ll mask){return mask & (-mask);}
ll pop_cnt(ll mask){return __builtin_popcountll(mask);}
ll ctz(ll mask){return __builtin_ctzll(mask);}
ll clz(ll mask){return __builtin_clzll(mask);}
ll logOf(ll mask){return 63 - clz(mask);}
template <class T1, class T2>
bool minimize(T1 &a, T2 b){
if (a > b){a = b; return true;}
return false;
}
template <class T1, class T2>
bool maximize(T1 &a, T2 b){
if (a < b){a = b; return true;}
return false;
}
template <class T>
void printArr(T& a, string separator = " ", string finish = "\n", ostream& out = cout){
for(auto i: a) out << i << separator;
out << finish;
}
template <class T>
void remove_dup(vector<T> &a){
sort(ALL(a));
a.resize(unique(ALL(a)) - a.begin());
}
ll Bruno(int n, int A[]){
ll X = 0;
int j = 0;
for(int i = 0; i<60; ++j){
while(j < n - 1 && A[j] == 0) j++;
if (j >= n-1) break;
if (A[j+1]) X += MASK(i);
j+=2;
}
return X;
}
// int main(void){
// ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// return 0;
// }
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
25 ms |
2392 KB |
Output isn't correct - L* = 0 |
2 |
Partially correct |
24 ms |
2608 KB |
Output isn't correct - L* = 0 |
3 |
Partially correct |
23 ms |
2364 KB |
Output isn't correct - L* = 0 |
4 |
Partially correct |
24 ms |
2404 KB |
Output isn't correct - L* = 0 |
5 |
Partially correct |
24 ms |
2416 KB |
Output isn't correct - L* = 0 |
6 |
Partially correct |
24 ms |
2432 KB |
Output isn't correct - L* = 0 |
7 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
8 |
Partially correct |
24 ms |
2900 KB |
Output isn't correct - L* = 0 |
9 |
Partially correct |
24 ms |
2404 KB |
Output isn't correct - L* = 0 |
10 |
Partially correct |
23 ms |
2404 KB |
Output isn't correct - L* = 0 |
11 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
12 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
13 |
Partially correct |
24 ms |
2308 KB |
Output isn't correct - L* = 0 |
14 |
Partially correct |
27 ms |
2652 KB |
Output isn't correct - L* = 0 |
15 |
Partially correct |
24 ms |
2404 KB |
Output isn't correct - L* = 0 |
16 |
Partially correct |
24 ms |
2496 KB |
Output isn't correct - L* = 0 |
17 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
18 |
Partially correct |
24 ms |
2492 KB |
Output isn't correct - L* = 0 |
19 |
Partially correct |
24 ms |
2400 KB |
Output isn't correct - L* = 0 |
20 |
Partially correct |
26 ms |
2400 KB |
Output isn't correct - L* = 0 |
21 |
Partially correct |
26 ms |
2628 KB |
Output isn't correct - L* = 0 |
22 |
Partially correct |
24 ms |
2404 KB |
Output isn't correct - L* = 0 |
23 |
Partially correct |
24 ms |
2548 KB |
Output isn't correct - L* = 0 |
24 |
Partially correct |
24 ms |
2408 KB |
Output isn't correct - L* = 0 |
25 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
26 |
Partially correct |
24 ms |
2636 KB |
Output isn't correct - L* = 0 |
27 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
28 |
Partially correct |
27 ms |
2396 KB |
Output isn't correct - L* = 0 |
29 |
Partially correct |
24 ms |
2400 KB |
Output isn't correct - L* = 0 |
30 |
Partially correct |
24 ms |
2900 KB |
Output isn't correct - L* = 0 |
31 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |
32 |
Partially correct |
26 ms |
2492 KB |
Output isn't correct - L* = 0 |
33 |
Partially correct |
24 ms |
2648 KB |
Output isn't correct - L* = 0 |
34 |
Partially correct |
23 ms |
2396 KB |
Output isn't correct - L* = 0 |
35 |
Partially correct |
26 ms |
2944 KB |
Output isn't correct - L* = 0 |
36 |
Partially correct |
25 ms |
2648 KB |
Output isn't correct - L* = 0 |
37 |
Partially correct |
25 ms |
2492 KB |
Output isn't correct - L* = 0 |
38 |
Partially correct |
27 ms |
2568 KB |
Output isn't correct - L* = 0 |
39 |
Partially correct |
24 ms |
2392 KB |
Output isn't correct - L* = 0 |
40 |
Partially correct |
24 ms |
2396 KB |
Output isn't correct - L* = 0 |