#include<bits/stdc++.h>
#include"Annalib.h"
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
const ll MOD=1e9+7;
const ll MOD2=998244353;
const ll N=4e5+5;
const ll K=350;
const ld pi=3.14159265359;
const ll INF=(1LL<<40);
#define SQ(i) ((i)*(i))
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define setp setprecision
#define lwb lower_bound
#define SZ(_a) (ll)_a.size()
bool bit(ll k,ll l){
if(k>60)return 0;
return (k>>l)&1;
}
void Anna(int n,ll x,int k,int *p){
bool vis[200];REP(i,200)vis[i]=1;REP(i,k)vis[p[i]]=0;
vector<ll> s[8]={{},{1},{0},{0,0},{1},{0,1},{1,0},{1,1}};
bool ans[200];memset(ans,0,sizeof(ans));
ll id=0;
for(int i=0;i<n;i+=3){
vector<ll> tmp;
tmp.pb(bit(x,id));tmp.pb(bit(x,id+1));
if(vis[i]+vis[i+1]+vis[i+2]<=1){continue;}
ll f1=-1,f2=-1,mask=(vis[i]*4+vis[i+1]*2+vis[i+2]);
for(int ty=1;ty<8;ty++){
if((mask&ty)!=mask)continue;
if(SZ(s[ty])==1){
if(s[ty][0]==tmp[0])f1=ty;
}else{
if(s[ty]==tmp)f2=ty;
}
}
if(f2!=-1){
id+=2;
REP(j,3)ans[i+j]=bit(f2,2-j);
}else{
id+=1;
REP(j,3)ans[i+j]=bit(f1,2-j);
}
}
REP(i,n)Set(i,ans[i]);
}
#include<bits/stdc++.h>
#include"Brunolib.h"
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
const ll MOD=1e9+7;
const ll MOD2=998244353;
const ll N=4e5+5;
const ll K=350;
const ld pi=3.14159265359;
const ll INF=(1LL<<40);
#define SQ(i) ((i)*(i))
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define setp setprecision
#define lwb lower_bound
#define SZ(_a) (ll)_a.size()
ll Bruno(int n,int *A){
ll ti=0,ans=0;
vector<ll> s[8]={{},{1},{0},{0,0},{1},{0,1},{1,0},{1,1}};
vector<ll> tans;
for(int i=0;i<n;i+=3){
ll mask=A[i]*4+A[i+1]*2+A[i+2];
for(auto j:s[mask])tans.pb(j);
}
REP(i,SZ(tans))if(tans[i])ans+=(1LL<<i);
return ans;
return ans;
}
Compilation message
Bruno.cpp: In function 'll Bruno(int, int*)':
Bruno.cpp:28:5: warning: unused variable 'ti' [-Wunused-variable]
28 | ll ti=0,ans=0;
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
2 |
Partially correct |
48 ms |
3056 KB |
Output isn't correct - L* = 0 |
3 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
4 |
Partially correct |
49 ms |
3072 KB |
Output isn't correct - L* = 0 |
5 |
Partially correct |
48 ms |
3056 KB |
Output isn't correct - L* = 0 |
6 |
Partially correct |
51 ms |
3064 KB |
Output isn't correct - L* = 0 |
7 |
Partially correct |
48 ms |
3056 KB |
Output isn't correct - L* = 0 |
8 |
Partially correct |
57 ms |
3136 KB |
Output isn't correct - L* = 0 |
9 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
10 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
11 |
Partially correct |
50 ms |
3072 KB |
Output isn't correct - L* = 0 |
12 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
13 |
Partially correct |
52 ms |
3072 KB |
Output isn't correct - L* = 0 |
14 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
15 |
Partially correct |
50 ms |
3072 KB |
Output isn't correct - L* = 0 |
16 |
Partially correct |
51 ms |
3056 KB |
Output isn't correct - L* = 0 |
17 |
Partially correct |
48 ms |
3328 KB |
Output isn't correct - L* = 0 |
18 |
Partially correct |
50 ms |
3072 KB |
Output isn't correct - L* = 0 |
19 |
Partially correct |
48 ms |
3072 KB |
Output isn't correct - L* = 0 |
20 |
Partially correct |
48 ms |
3056 KB |
Output isn't correct - L* = 0 |
21 |
Partially correct |
50 ms |
2896 KB |
Output isn't correct - L* = 0 |
22 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
23 |
Partially correct |
52 ms |
3056 KB |
Output isn't correct - L* = 0 |
24 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
25 |
Partially correct |
48 ms |
3312 KB |
Output isn't correct - L* = 0 |
26 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
27 |
Partially correct |
53 ms |
3120 KB |
Output isn't correct - L* = 0 |
28 |
Partially correct |
48 ms |
3072 KB |
Output isn't correct - L* = 0 |
29 |
Partially correct |
49 ms |
3072 KB |
Output isn't correct - L* = 0 |
30 |
Partially correct |
51 ms |
3056 KB |
Output isn't correct - L* = 0 |
31 |
Partially correct |
50 ms |
3072 KB |
Output isn't correct - L* = 0 |
32 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
33 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
34 |
Partially correct |
48 ms |
3072 KB |
Output isn't correct - L* = 0 |
35 |
Partially correct |
48 ms |
3056 KB |
Output isn't correct - L* = 0 |
36 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
37 |
Partially correct |
49 ms |
3056 KB |
Output isn't correct - L* = 0 |
38 |
Partially correct |
48 ms |
3072 KB |
Output isn't correct - L* = 0 |
39 |
Partially correct |
50 ms |
3056 KB |
Output isn't correct - L* = 0 |
40 |
Partially correct |
48 ms |
3072 KB |
Output isn't correct - L* = 0 |