#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 N = 150, OO = 1e18, mod = 1e9+7, mx = 10;
void tr(int a, int b){cout << a << sp << b << endl;}
void cmx(int &a, int b){a = max(a,b);}
void cmn(int &a, int b){a = min(a,b);}
const int dx[]{0,0,-1,1}, dy[]{1,-1,0,0};
int mp[N], ans[N];
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+60<=150; ++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()
const int N = 1e5+10, OO = 1e18, mod = 1e9+7, mx = 10;
const int dx[]{0,0,-1,1}, dy[]{1,-1,0,0};
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+60<=N; ++i){
if(A[i]){
ans += (1LL<<i);
}
}
return ans;
}
Compilation message
Anna.cpp:17:25: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
17 | const int N = 150, OO = 1e18, mod = 1e9+7, mx = 10;
| ^~~~
Bruno.cpp:17:28: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
17 | const int N = 1e5+10, OO = 1e18, mod = 1e9+7, mx = 10;
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
27 ms |
2648 KB |
Output isn't correct - L* = 0 |
2 |
Partially correct |
30 ms |
2676 KB |
Output isn't correct - L* = 0 |
3 |
Partially correct |
30 ms |
2396 KB |
Output isn't correct - L* = 0 |
4 |
Partially correct |
27 ms |
2312 KB |
Output isn't correct - L* = 0 |
5 |
Partially correct |
31 ms |
2400 KB |
Output isn't correct - L* = 0 |
6 |
Partially correct |
28 ms |
2368 KB |
Output isn't correct - L* = 0 |
7 |
Partially correct |
27 ms |
2392 KB |
Output isn't correct - L* = 0 |
8 |
Partially correct |
27 ms |
2396 KB |
Output isn't correct - L* = 0 |
9 |
Partially correct |
33 ms |
2404 KB |
Output isn't correct - L* = 0 |
10 |
Partially correct |
27 ms |
2712 KB |
Output isn't correct - L* = 0 |
11 |
Partially correct |
27 ms |
2372 KB |
Output isn't correct - L* = 0 |
12 |
Partially correct |
28 ms |
2572 KB |
Output isn't correct - L* = 0 |
13 |
Partially correct |
27 ms |
2484 KB |
Output isn't correct - L* = 0 |
14 |
Partially correct |
33 ms |
2516 KB |
Output isn't correct - L* = 0 |
15 |
Partially correct |
27 ms |
2564 KB |
Output isn't correct - L* = 0 |
16 |
Partially correct |
31 ms |
2516 KB |
Output isn't correct - L* = 0 |
17 |
Partially correct |
27 ms |
2400 KB |
Output isn't correct - L* = 0 |
18 |
Partially correct |
27 ms |
2372 KB |
Output isn't correct - L* = 0 |
19 |
Partially correct |
31 ms |
2364 KB |
Output isn't correct - L* = 0 |
20 |
Partially correct |
34 ms |
2372 KB |
Output isn't correct - L* = 0 |
21 |
Partially correct |
31 ms |
2628 KB |
Output isn't correct - L* = 0 |
22 |
Partially correct |
28 ms |
2396 KB |
Output isn't correct - L* = 0 |
23 |
Partially correct |
27 ms |
2404 KB |
Output isn't correct - L* = 0 |
24 |
Partially correct |
27 ms |
2612 KB |
Output isn't correct - L* = 0 |
25 |
Partially correct |
27 ms |
2408 KB |
Output isn't correct - L* = 0 |
26 |
Partially correct |
27 ms |
2368 KB |
Output isn't correct - L* = 0 |
27 |
Partially correct |
29 ms |
2396 KB |
Output isn't correct - L* = 0 |
28 |
Partially correct |
36 ms |
2640 KB |
Output isn't correct - L* = 0 |
29 |
Partially correct |
30 ms |
2404 KB |
Output isn't correct - L* = 0 |
30 |
Partially correct |
27 ms |
2372 KB |
Output isn't correct - L* = 0 |
31 |
Partially correct |
33 ms |
2368 KB |
Output isn't correct - L* = 0 |
32 |
Partially correct |
32 ms |
2404 KB |
Output isn't correct - L* = 0 |
33 |
Partially correct |
27 ms |
2384 KB |
Output isn't correct - L* = 0 |
34 |
Partially correct |
28 ms |
2744 KB |
Output isn't correct - L* = 0 |
35 |
Partially correct |
27 ms |
2304 KB |
Output isn't correct - L* = 0 |
36 |
Partially correct |
29 ms |
2484 KB |
Output isn't correct - L* = 0 |
37 |
Partially correct |
28 ms |
2396 KB |
Output isn't correct - L* = 0 |
38 |
Partially correct |
28 ms |
2392 KB |
Output isn't correct - L* = 0 |
39 |
Partially correct |
27 ms |
2396 KB |
Output isn't correct - L* = 0 |
40 |
Partially correct |
27 ms |
2468 KB |
Output isn't correct - L* = 0 |