답안 #231570

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
231570 2020-05-14T01:38:23 Z syy Broken Device (JOI17_broken_device) C++17
0 / 100
56 ms 3328 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(ll i = (ll)a; i <= (ll)b; i++)
#define DEC(i, a, b) for(ll i = (ll)a; i >= (ll)b; i--)
typedef pair<ll, ll> pi;
#define f first
#define s second
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

void Anna(int n, long long x, int k, int p[]){
	bool ok[155], used[155];
	memset(ok, 1, sizeof ok);
	memset(used, 0, sizeof used);
	
	FOR(i, 0, k-1) ok[p[i]] = 0;
	ll cur = 0;
	FOR(i, 0, n-2) if (ok[i] and ok[i+1]) {
		Set(i, 1);
		Set(i+1, ((x >> cur) & 1));
		used[i] = 1; used[i+1] = 1;
		i++; cur++;
	}
	FOR(i, 0, n-1) if (!used[i]) Set(i, 0);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(ll i = (ll)a; i <= (ll)b; i++)
#define DEC(i, a, b) for(ll i = (ll)a; i >= (ll)b; i--)
typedef pair<ll, ll> pi;
#define f first
#define s second
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

long long Bruno(int n, int arr[] ){
	ll cur = 0; ll res = 0;
	FOR(i, 0, n-2) if (arr[i] == 1) {
		res += (ll) (arr[i+1] << cur);
		i++; cur++;
		if (cur > 62) break;
	}
	return res;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 48 ms 3072 KB Output isn't correct - L* = 0
2 Partially correct 50 ms 3056 KB Output isn't correct - L* = 0
3 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
4 Partially correct 50 ms 2816 KB Output isn't correct - L* = 0
5 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
6 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
7 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
8 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
9 Partially correct 49 ms 3328 KB Output isn't correct - L* = 0
10 Partially correct 48 ms 3056 KB Output isn't correct - L* = 0
11 Partially correct 50 ms 3056 KB Output isn't correct - L* = 0
12 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
13 Partially correct 56 ms 3056 KB Output isn't correct - L* = 0
14 Partially correct 48 ms 3072 KB Output isn't correct - L* = 0
15 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
16 Partially correct 51 ms 3072 KB Output isn't correct - L* = 0
17 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
18 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
19 Partially correct 48 ms 3072 KB Output isn't correct - L* = 0
20 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
21 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
22 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
23 Partially correct 51 ms 2968 KB Output isn't correct - L* = 0
24 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
25 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
26 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
27 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
28 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
29 Partially correct 52 ms 3312 KB Output isn't correct - L* = 0
30 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
31 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
32 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
33 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
34 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
35 Partially correct 49 ms 3048 KB Output isn't correct - L* = 0
36 Partially correct 51 ms 3072 KB Output isn't correct - L* = 0
37 Partially correct 49 ms 3072 KB Output isn't correct - L* = 0
38 Partially correct 50 ms 3072 KB Output isn't correct - L* = 0
39 Partially correct 52 ms 3072 KB Output isn't correct - L* = 0
40 Partially correct 48 ms 3072 KB Output isn't correct - L* = 0