#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define vi vector<int>
#define rep(i,x,n) for(int i=x; i<n; ++i)
#define For(i,n) rep(i,0,n)
#define endl "\n"
#define sp ' '
#define pb push_back
#define f first
#define s second
#define sz size()
#define all(x) (x).begin(),(x).end()
const int NN = 200, OO = 1e9, mod = 1e9+7;
int mp[NN], ans[NN];
void Anna( int n, long long x, int k, int p[] ){
memset(mp,0,sizeof(mp)); memset(ans,0,sizeof(ans));
For(i,k){
mp[p[i]] = 1;
}
vi v;
For(i,60){
if((1LL<<i) & x){
v.pb(i);
}
}
for(int i=0; i<=89; ++i){
bool ok = 1;
for(int j=i; j<=i+60; ++j){
ok &= (!mp[j]);
}
if(ok){
ans[i] = 1;
for(int x: v){
ans[i+x+1] = 1;
}
break;
}
}
For(i,n){
Set(i,ans[i]);
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define vi vector<int>
#define rep(i,x,n) for(int i=x; i<n; ++i)
#define For(i,n) rep(i,0,n)
#define endl "\n"
#define sp ' '
#define pb push_back
#define f first
#define s second
#define sz size()
#define all(x) (x).begin(),(x).end()
long long Bruno( int N, int A[] ){
int fi = 0;
For(i,N){
if(A[i]) {
fi = i;
break;
}
}
ll ans = 0;
for(int i=fi+1; i<N; ++i){
if(A[i]){
ans += (1LL<<(i-fi-1));
}
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
27 ms |
2388 KB |
Output is partially correct - L* = 14 |
2 |
Partially correct |
27 ms |
2508 KB |
Output is partially correct - L* = 14 |
3 |
Partially correct |
27 ms |
2392 KB |
Output is partially correct - L* = 14 |
4 |
Partially correct |
27 ms |
2472 KB |
Output is partially correct - L* = 14 |
5 |
Partially correct |
26 ms |
2372 KB |
Output is partially correct - L* = 15 |
6 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
7 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
8 |
Partially correct |
27 ms |
2404 KB |
Output is partially correct - L* = 14 |
9 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
10 |
Partially correct |
27 ms |
2540 KB |
Output is partially correct - L* = 14 |
11 |
Partially correct |
32 ms |
2488 KB |
Output is partially correct - L* = 14 |
12 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
13 |
Partially correct |
27 ms |
2404 KB |
Output is partially correct - L* = 14 |
14 |
Partially correct |
27 ms |
2380 KB |
Output is partially correct - L* = 14 |
15 |
Partially correct |
27 ms |
2436 KB |
Output is partially correct - L* = 14 |
16 |
Partially correct |
26 ms |
2396 KB |
Output is partially correct - L* = 14 |
17 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
18 |
Partially correct |
27 ms |
2624 KB |
Output is partially correct - L* = 14 |
19 |
Partially correct |
27 ms |
2748 KB |
Output is partially correct - L* = 14 |
20 |
Partially correct |
27 ms |
2404 KB |
Output is partially correct - L* = 14 |
21 |
Partially correct |
27 ms |
2336 KB |
Output is partially correct - L* = 14 |
22 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
23 |
Partially correct |
27 ms |
2488 KB |
Output is partially correct - L* = 14 |
24 |
Partially correct |
32 ms |
2304 KB |
Output is partially correct - L* = 14 |
25 |
Partially correct |
28 ms |
2396 KB |
Output is partially correct - L* = 14 |
26 |
Partially correct |
26 ms |
2400 KB |
Output is partially correct - L* = 14 |
27 |
Partially correct |
27 ms |
2512 KB |
Output is partially correct - L* = 14 |
28 |
Partially correct |
33 ms |
2368 KB |
Output is partially correct - L* = 15 |
29 |
Partially correct |
27 ms |
2460 KB |
Output is partially correct - L* = 14 |
30 |
Partially correct |
26 ms |
2404 KB |
Output is partially correct - L* = 14 |
31 |
Partially correct |
27 ms |
2568 KB |
Output is partially correct - L* = 14 |
32 |
Partially correct |
26 ms |
2476 KB |
Output is partially correct - L* = 14 |
33 |
Partially correct |
27 ms |
2492 KB |
Output is partially correct - L* = 14 |
34 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
35 |
Partially correct |
28 ms |
2372 KB |
Output is partially correct - L* = 14 |
36 |
Partially correct |
33 ms |
2372 KB |
Output is partially correct - L* = 14 |
37 |
Partially correct |
27 ms |
2396 KB |
Output is partially correct - L* = 14 |
38 |
Partially correct |
27 ms |
2308 KB |
Output is partially correct - L* = 14 |
39 |
Partially correct |
32 ms |
2480 KB |
Output is partially correct - L* = 14 |
40 |
Partially correct |
27 ms |
2832 KB |
Output is partially correct - L* = 14 |