답안 #231571

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
231571 2020-05-14T01:40:24 Z syy Broken Device (JOI17_broken_device) C++17
41 / 100
62 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) (((ll)arr[i+1]) << cur);
		i++; cur++;
		if (cur > 62) break;
	}
	return res;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 51 ms 3072 KB Output is partially correct - L* = 15
2 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 52 ms 3056 KB Output is partially correct - L* = 17
4 Partially correct 51 ms 3072 KB Output is partially correct - L* = 16
5 Partially correct 51 ms 2928 KB Output is partially correct - L* = 15
6 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
7 Partially correct 50 ms 3072 KB Output is partially correct - L* = 18
8 Partially correct 49 ms 3056 KB Output is partially correct - L* = 18
9 Partially correct 49 ms 3072 KB Output is partially correct - L* = 16
10 Partially correct 51 ms 3064 KB Output is partially correct - L* = 16
11 Partially correct 54 ms 3056 KB Output is partially correct - L* = 17
12 Partially correct 50 ms 3072 KB Output is partially correct - L* = 17
13 Partially correct 50 ms 3072 KB Output is partially correct - L* = 15
14 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
15 Partially correct 46 ms 2800 KB Output is partially correct - L* = 16
16 Partially correct 50 ms 3328 KB Output is partially correct - L* = 15
17 Partially correct 48 ms 3072 KB Output is partially correct - L* = 17
18 Partially correct 53 ms 3072 KB Output is partially correct - L* = 16
19 Partially correct 50 ms 3072 KB Output is partially correct - L* = 18
20 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
21 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
22 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
23 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
24 Partially correct 62 ms 3328 KB Output is partially correct - L* = 17
25 Partially correct 50 ms 3072 KB Output is partially correct - L* = 15
26 Partially correct 51 ms 3072 KB Output is partially correct - L* = 16
27 Partially correct 51 ms 3056 KB Output is partially correct - L* = 15
28 Partially correct 51 ms 3072 KB Output is partially correct - L* = 16
29 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
30 Partially correct 49 ms 3072 KB Output is partially correct - L* = 16
31 Partially correct 48 ms 3072 KB Output is partially correct - L* = 15
32 Partially correct 50 ms 3072 KB Output is partially correct - L* = 16
33 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
34 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
35 Partially correct 51 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15
37 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
38 Partially correct 49 ms 3072 KB Output is partially correct - L* = 17
39 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
40 Partially correct 49 ms 3072 KB Output is partially correct - L* = 15