Submission #21340

# Submission time Handle Problem Language Result Execution time Memory
21340 2017-04-13T11:08:02 Z krauch Broken Device (JOI17_broken_device) C++14
0 / 100
0 ms 4636 KB
/*
 _    _    _______   _    _
| |  / /  |  _____| | |  / /
| | / /   | |       | | / /
| |/ /    | |_____  | |/ /
| |\ \    |  _____| | |\ \
| | \ \  	| |       | | \ \
| |  \ \  | |_____  | |  \ \
|_|   \_\ |_______| |_|   \_\

*/
#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[]) {
	vector < int > vec;
	forn(i, 0, K - 1) {
		bad[a[i]] = 1;
	}
	forn(i, 0, n - 1) {
		if (!bad[i] && !bad[i + 1]) vec.eb(i++);
	}
	int ptr = 0;
	for (auto it : vec) {
		Set(it, 1);
		Set(it + 1, (X >> ptr) & 1);
		++ptr;
	}
}
/*
 _    _    _______   _    _
| |  / /  |  _____| | |  / /
| | / /   | |       | | / /
| |/ /    | |_____  | |/ /
| |\ \    |  _____| | |\ \
| | \ \   | |       | | \ \
| |  \ \  | |_____  | |  \ \
|_|   \_\ |_______| |_|   \_\

*/
#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;
	int ptr = 0;
	forn(i, 0, n - 1) {
		if (a[i] == 1) {
			res |= (a[i + 1] << ptr);
			++ptr;
			++i;
		}
	}
	return res;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 4636 KB Wrong Answer [4]
2 Incorrect 0 ms 4636 KB Wrong Answer [4]
3 Incorrect 0 ms 4636 KB Wrong Answer [4]
4 Incorrect 0 ms 4636 KB Wrong Answer [4]
5 Incorrect 0 ms 4636 KB Wrong Answer [4]
6 Incorrect 0 ms 4636 KB Wrong Answer [4]
7 Incorrect 0 ms 4636 KB Wrong Answer [4]
8 Incorrect 0 ms 4636 KB Wrong Answer [4]
9 Incorrect 0 ms 4636 KB Wrong Answer [4]
10 Incorrect 0 ms 4636 KB Wrong Answer [4]
11 Incorrect 0 ms 4636 KB Wrong Answer [1]
12 Incorrect 0 ms 4636 KB Wrong Answer [4]
13 Incorrect 0 ms 4636 KB Wrong Answer [4]
14 Incorrect 0 ms 4636 KB Wrong Answer [1]
15 Incorrect 0 ms 4636 KB Wrong Answer [4]
16 Incorrect 0 ms 4636 KB Wrong Answer [4]
17 Incorrect 0 ms 4636 KB Wrong Answer [4]
18 Incorrect 0 ms 4636 KB Wrong Answer [4]
19 Incorrect 0 ms 4636 KB Wrong Answer [4]
20 Incorrect 0 ms 4636 KB Wrong Answer [1]
21 Incorrect 0 ms 4636 KB Wrong Answer [4]
22 Incorrect 0 ms 4636 KB Wrong Answer [1]
23 Incorrect 0 ms 4636 KB Wrong Answer [4]
24 Incorrect 0 ms 4636 KB Wrong Answer [4]
25 Incorrect 0 ms 4636 KB Wrong Answer [1]
26 Incorrect 0 ms 4636 KB Wrong Answer [4]
27 Incorrect 0 ms 4636 KB Wrong Answer [4]
28 Incorrect 0 ms 4636 KB Wrong Answer [1]
29 Incorrect 0 ms 4636 KB Wrong Answer [1]
30 Incorrect 0 ms 4636 KB Wrong Answer [4]
31 Incorrect 0 ms 4636 KB Wrong Answer [1]
32 Incorrect 0 ms 4636 KB Wrong Answer [4]
33 Incorrect 0 ms 4636 KB Wrong Answer [4]
34 Incorrect 0 ms 4636 KB Wrong Answer [1]
35 Incorrect 0 ms 4636 KB Wrong Answer [1]
36 Incorrect 0 ms 4636 KB Wrong Answer [1]
37 Incorrect 0 ms 4636 KB Wrong Answer [4]
38 Incorrect 0 ms 4636 KB Wrong Answer [1]
39 Incorrect 0 ms 4636 KB Wrong Answer [4]
40 Incorrect 0 ms 4636 KB Wrong Answer [1]