#include "Annalib.h"
#include <bits/stdc++.h>
#define pb push_back
#define all(v) ((v).begin(), (v).end())
#define sortv(v) sort(all(v))
#define sz(v) ((int)(v).size())
#define uniqv(v) (v).erase(unique(all(v)), (v).end())
#define umax(a, b) (a)=max((a), (b))
#define umin(a, b) (a)=min((a), (b))
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define rep(i,n) FOR(i,1,n)
#define rep0(i,n) FOR(i,0,(int)(n)-1)
#define FI first
#define SE second
#define INF 2000000000
#define INFLL 1000000000000000000LL
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAX_N = 150;
bool chk[MAX_N+1];
void Anna( int N, long long X, int K, int P[]){
for(int i=0; i<N; i++) chk[i] = false;
for(int i=0; i<K; i++){
chk[P[i]] = true;
}
for(int i = 0; i < N; i+=2){
if(chk[i] || chk[i+1]) continue;
if(X%(ll)3==0){
Set(i, 1);
Set(i+1, 1);
}else if(X%(ll)3==1){
Set(i, 1);
Set(i+1, 0);
}else{
Set(i, 0);
Set(i+1, 1);
}
X/=(ll)3;
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
#define pb push_back
#define all(v) ((v).begin(), (v).end())
#define sortv(v) sort(all(v))
#define sz(v) ((int)(v).size())
#define uniqv(v) (v).erase(unique(all(v)), (v).end())
#define umax(a, b) (a)=max((a), (b))
#define umin(a, b) (a)=min((a), (b))
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define rep(i,n) FOR(i,1,n)
#define rep0(i,n) FOR(i,0,(int)(n)-1)
#define FI first
#define SE second
#define INF 2000000000
#define INFLL 1000000000000000000LL
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
long long Bruno( int N, int A[] ){
ll ans = 0;
ll thr = 1;
for(int i=0; i<N; i+=2){
if(A[i]==0 && A[i+1]==0) continue;
if(A[i]==1 && A[i+1]==0){
ans += 1 * thr;
}else if(A[i]==0 && A[i+1]==1){
ans += 2 * thr;
}
thr*=(ll)3;
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
772 KB |
Wrong Answer [4] |
2 |
Incorrect |
4 ms |
864 KB |
Wrong Answer [4] |
3 |
Incorrect |
4 ms |
768 KB |
Wrong Answer [4] |
4 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
5 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
6 |
Incorrect |
4 ms |
768 KB |
Wrong Answer [4] |
7 |
Incorrect |
4 ms |
1020 KB |
Wrong Answer [4] |
8 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
9 |
Incorrect |
4 ms |
788 KB |
Wrong Answer [4] |
10 |
Incorrect |
4 ms |
864 KB |
Wrong Answer [4] |
11 |
Incorrect |
4 ms |
776 KB |
Wrong Answer [4] |
12 |
Incorrect |
4 ms |
1024 KB |
Wrong Answer [4] |
13 |
Incorrect |
4 ms |
768 KB |
Wrong Answer [4] |
14 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
15 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
16 |
Incorrect |
4 ms |
1024 KB |
Wrong Answer [4] |
17 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
18 |
Incorrect |
4 ms |
1012 KB |
Wrong Answer [4] |
19 |
Incorrect |
4 ms |
1016 KB |
Wrong Answer [4] |
20 |
Incorrect |
4 ms |
864 KB |
Wrong Answer [4] |
21 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
22 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
23 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
24 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
25 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
26 |
Incorrect |
4 ms |
884 KB |
Wrong Answer [4] |
27 |
Incorrect |
4 ms |
780 KB |
Wrong Answer [4] |
28 |
Incorrect |
4 ms |
1020 KB |
Wrong Answer [4] |
29 |
Incorrect |
4 ms |
908 KB |
Wrong Answer [4] |
30 |
Incorrect |
4 ms |
1016 KB |
Wrong Answer [4] |
31 |
Incorrect |
5 ms |
908 KB |
Wrong Answer [4] |
32 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
33 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
34 |
Incorrect |
4 ms |
860 KB |
Wrong Answer [4] |
35 |
Incorrect |
4 ms |
908 KB |
Wrong Answer [4] |
36 |
Incorrect |
4 ms |
864 KB |
Wrong Answer [4] |
37 |
Incorrect |
4 ms |
904 KB |
Wrong Answer [4] |
38 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
39 |
Incorrect |
4 ms |
896 KB |
Wrong Answer [4] |
40 |
Incorrect |
4 ms |
892 KB |
Wrong Answer [4] |