/*
_ _ _______ _ _
| | / / | _____| | | / /
| | / / | | | | / /
| |/ / | |_____ | |/ /
| |\ \ | _____| | |\ \
| | \ \ | | | | \ \
| | \ \ | |_____ | | \ \
|_| \_\ |_______| |_| \_\
*/
#include <iostream>
#include <cstdio>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <cstring>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <assert.h>
#include "Annalib.h"
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair <int, int> PII;
typedef pair <ll, ll> PLL;
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define right(x) x << 1 | 1
#define left(x) x << 1
#define forn(x, a, b) for (int x = a; x <= b; ++x)
#define for1(x, a, b) for (int x = a; x >= b; --x)
#define mkp make_pair
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
#define y1 kekekek
const long long ool = 1e18 + 9;
const int oo = 1e9 + 9, base = 1e9 + 7;
const double eps = 1e-7;
const int N = 200;
bool bad[N];
void Anna(int n, ll X, int K, int a[]) {
memset(bad, 0, sizeof bad);
forn(i, 0, K - 1) {
bad[a[i]] = 1;
}
ll ptr = 0;
forn(i, 0, n - 1) {
if (i + 1 < n && !bad[i] && !bad[i + 1]) {
Set(i, 1);
Set(i + 1, (X >> ptr) & 1ll);
++ptr;
++i;
}
else Set(i, 0);
}
}
/*
_ _ _______ _ _
| | / / | _____| | | / /
| | / / | | | | / /
| |/ / | |_____ | |/ /
| |\ \ | _____| | |\ \
| | \ \ | | | | \ \
| | \ \ | |_____ | | \ \
|_| \_\ |_______| |_| \_\
*/
#include <iostream>
#include <cstdio>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <cstring>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <assert.h>
#include "Brunolib.h"
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair <int, int> PII;
typedef pair <ll, ll> PLL;
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define right(x) x << 1 | 1
#define left(x) x << 1
#define forn(x, a, b) for (int x = a; x <= b; ++x)
#define for1(x, a, b) for (int x = a; x >= b; --x)
#define mkp make_pair
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
#define y1 kekekek
const long long ool = 1e18 + 9;
const int oo = 1e9 + 9, base = 1e9 + 7;
const double eps = 1e-7;
const int N = 2e6 + 6;
ll Bruno(int n, int a[]) {
ll res = 0, ptr = 0;
forn(i, 0, n - 1) {
if (a[i] == 1) {
if (a[i + 1]) res |= (1ll << ptr);
++ptr;
++i;
}
}
return res;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
27 ms |
4636 KB |
Output is partially correct - L* = 15 |
2 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
3 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 17 |
4 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 16 |
5 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
6 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
7 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 18 |
8 |
Partially correct |
27 ms |
4636 KB |
Output is partially correct - L* = 18 |
9 |
Partially correct |
41 ms |
4636 KB |
Output is partially correct - L* = 16 |
10 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 16 |
11 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 17 |
12 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 17 |
13 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
14 |
Partially correct |
49 ms |
4636 KB |
Output is partially correct - L* = 15 |
15 |
Partially correct |
41 ms |
4636 KB |
Output is partially correct - L* = 16 |
16 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
17 |
Partially correct |
45 ms |
4636 KB |
Output is partially correct - L* = 17 |
18 |
Partially correct |
38 ms |
4636 KB |
Output is partially correct - L* = 16 |
19 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 18 |
20 |
Partially correct |
32 ms |
4636 KB |
Output is partially correct - L* = 15 |
21 |
Partially correct |
49 ms |
4636 KB |
Output is partially correct - L* = 15 |
22 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
23 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
24 |
Partially correct |
52 ms |
4636 KB |
Output is partially correct - L* = 17 |
25 |
Partially correct |
41 ms |
4636 KB |
Output is partially correct - L* = 15 |
26 |
Partially correct |
38 ms |
4636 KB |
Output is partially correct - L* = 16 |
27 |
Partially correct |
49 ms |
4636 KB |
Output is partially correct - L* = 15 |
28 |
Partially correct |
32 ms |
4636 KB |
Output is partially correct - L* = 16 |
29 |
Partially correct |
39 ms |
4636 KB |
Output is partially correct - L* = 15 |
30 |
Partially correct |
28 ms |
4636 KB |
Output is partially correct - L* = 16 |
31 |
Partially correct |
45 ms |
4636 KB |
Output is partially correct - L* = 15 |
32 |
Partially correct |
39 ms |
4636 KB |
Output is partially correct - L* = 16 |
33 |
Partially correct |
35 ms |
4636 KB |
Output is partially correct - L* = 15 |
34 |
Partially correct |
32 ms |
4636 KB |
Output is partially correct - L* = 16 |
35 |
Partially correct |
28 ms |
4636 KB |
Output is partially correct - L* = 15 |
36 |
Partially correct |
36 ms |
4636 KB |
Output is partially correct - L* = 15 |
37 |
Partially correct |
45 ms |
4636 KB |
Output is partially correct - L* = 16 |
38 |
Partially correct |
28 ms |
4636 KB |
Output is partially correct - L* = 17 |
39 |
Partially correct |
39 ms |
4636 KB |
Output is partially correct - L* = 15 |
40 |
Partially correct |
32 ms |
4636 KB |
Output is partially correct - L* = 15 |