답안 #21347

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
21347 2017-04-13T11:27:52 Z krauch Broken Device (JOI17_broken_device) C++14
0 / 100
49 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[]) {
	memset(bad, 0, sizeof bad);
	forn(i, 0, K - 1) {
		bad[a[i]] = 1;
	}
	int ptr = 0;
	forn(i, 0, n - 1) {
		if (i + 1 < n && !bad[i] && !bad[i + 1]) {
			Set(i, 1);
			Set(i + 1, (X >> ptr) & 1);
			++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;
	int ptr = 0;
	forn(i, 0, n - 1) {
		if (a[i] == 1) {
			res |= (a[i + 1] << ptr);
			++ptr;
			++i;
		}
	}
	return res;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
2 Incorrect 36 ms 4636 KB Output isn't correct - L* = 0
3 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
4 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
5 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
6 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
7 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
8 Incorrect 39 ms 4636 KB Output isn't correct - L* = 0
9 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
10 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
11 Incorrect 28 ms 4636 KB Output isn't correct - L* = 0
12 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
13 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
14 Incorrect 28 ms 4636 KB Output isn't correct - L* = 0
15 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
16 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
17 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
18 Incorrect 41 ms 4636 KB Output isn't correct - L* = 0
19 Incorrect 28 ms 4636 KB Output isn't correct - L* = 0
20 Incorrect 39 ms 4636 KB Output isn't correct - L* = 0
21 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
22 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
23 Incorrect 36 ms 4636 KB Output isn't correct - L* = 0
24 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
25 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
26 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
27 Incorrect 39 ms 4636 KB Output isn't correct - L* = 0
28 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
29 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
30 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
31 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
32 Incorrect 49 ms 4636 KB Output isn't correct - L* = 0
33 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
34 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
35 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
36 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
37 Incorrect 39 ms 4636 KB Output isn't correct - L* = 0
38 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0
39 Incorrect 32 ms 4636 KB Output isn't correct - L* = 0
40 Incorrect 35 ms 4636 KB Output isn't correct - L* = 0