#include "Annalib.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii;
void Anna(int n, long long val, int k, int p[]){
bool amos[155];
memset(amos,0,sizeof(amos));
for(int x=0;x<k;x++){
amos[p[x]]=true;
}
vector<int>v;
for(int x=0;x<60;x++){
if(val&(1LL<<x)) v.push_back(1);
else v.push_back(0);
}
int ptr=0;
for(int x=0;x<n;x++){
if(ptr<(int)v.size()&&x!=n-1&&!amos[x]&&!amos[x-1]){
Set(x,1);
Set(x+1,v[ptr]);
x++;
ptr++;
}
else Set(x,0);
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii;
long long Bruno(int n, int a[]){
long long val=0;
int cur=0;
//for(int x=0;x<n;x++) cout << a[x] << " ";
//cout << endl;
for(int x=0;x<n;x++){
if(a[x]==1){
if(a[x+1]==1){
val+=1LL<<cur;
}
cur++;
x++;
}
}
//cout << "check" << endl;
return val;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
25 ms |
2596 KB |
Output isn't correct - L* = 0 |
2 |
Partially correct |
22 ms |
2372 KB |
Output isn't correct - L* = 0 |
3 |
Partially correct |
20 ms |
2416 KB |
Output isn't correct - L* = 0 |
4 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
5 |
Partially correct |
20 ms |
2400 KB |
Output isn't correct - L* = 0 |
6 |
Partially correct |
24 ms |
2392 KB |
Output isn't correct - L* = 0 |
7 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
8 |
Partially correct |
23 ms |
2488 KB |
Output isn't correct - L* = 0 |
9 |
Partially correct |
23 ms |
2400 KB |
Output isn't correct - L* = 0 |
10 |
Partially correct |
23 ms |
2500 KB |
Output isn't correct - L* = 0 |
11 |
Partially correct |
22 ms |
2404 KB |
Output isn't correct - L* = 0 |
12 |
Partially correct |
22 ms |
2392 KB |
Output isn't correct - L* = 0 |
13 |
Partially correct |
28 ms |
2600 KB |
Output isn't correct - L* = 0 |
14 |
Partially correct |
26 ms |
2388 KB |
Output isn't correct - L* = 0 |
15 |
Partially correct |
22 ms |
2404 KB |
Output isn't correct - L* = 0 |
16 |
Partially correct |
20 ms |
2404 KB |
Output isn't correct - L* = 0 |
17 |
Partially correct |
22 ms |
2480 KB |
Output isn't correct - L* = 0 |
18 |
Partially correct |
22 ms |
2536 KB |
Output isn't correct - L* = 0 |
19 |
Partially correct |
20 ms |
2476 KB |
Output isn't correct - L* = 0 |
20 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
21 |
Partially correct |
22 ms |
2396 KB |
Output isn't correct - L* = 0 |
22 |
Partially correct |
25 ms |
2628 KB |
Output isn't correct - L* = 0 |
23 |
Partially correct |
22 ms |
2616 KB |
Output isn't correct - L* = 0 |
24 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
25 |
Partially correct |
20 ms |
2400 KB |
Output isn't correct - L* = 0 |
26 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
27 |
Partially correct |
23 ms |
2464 KB |
Output isn't correct - L* = 0 |
28 |
Partially correct |
22 ms |
2368 KB |
Output isn't correct - L* = 0 |
29 |
Partially correct |
20 ms |
2488 KB |
Output isn't correct - L* = 0 |
30 |
Partially correct |
22 ms |
2392 KB |
Output isn't correct - L* = 0 |
31 |
Partially correct |
20 ms |
2400 KB |
Output isn't correct - L* = 0 |
32 |
Partially correct |
20 ms |
2488 KB |
Output isn't correct - L* = 0 |
33 |
Partially correct |
20 ms |
2396 KB |
Output isn't correct - L* = 0 |
34 |
Partially correct |
20 ms |
2492 KB |
Output isn't correct - L* = 0 |
35 |
Partially correct |
22 ms |
2396 KB |
Output isn't correct - L* = 0 |
36 |
Partially correct |
20 ms |
2508 KB |
Output isn't correct - L* = 0 |
37 |
Partially correct |
26 ms |
2388 KB |
Output isn't correct - L* = 0 |
38 |
Partially correct |
22 ms |
2392 KB |
Output isn't correct - L* = 0 |
39 |
Partially correct |
20 ms |
2432 KB |
Output isn't correct - L* = 0 |
40 |
Partially correct |
22 ms |
2600 KB |
Output isn't correct - L* = 0 |