답안 #70663

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
70663 2018-08-23T08:21:01 Z Inovak Broken Device (JOI17_broken_device) C++14
0 / 100
73 ms 4064 KB
#include "Annalib.h"

#include <bits/stdc++.h>

#define fr first
#define sc second
#define pb push_back
#define mk make_pair
#define ll long long
#define OK puts("OK");
#define sz(s) (int)s.size()
#define all(s) s.begin(), s.end()

using namespace std;

int u[1000];

void Anna( int N, long long X, int K, int P[] ) {
    int cnt = 0, cn = 0;
    int l = 0;
    while((1ll << l) <= X) l++;

    for(int i = 0; i < K; i++)
        u[P[i]] = 1;
    for( int i = 0; i < N - 1; i++) {
        if(u[i] || u[i + 1] || cnt >= l) {
            Set(i, 0);
            cn++;
        }
        else {
            Set(i, 1);
            Set(i + 1, ((X & (1ll << cnt)) ? 1 : 0));
            cn += 2;
            cnt++;
            i++;
        }
    }
    if(cn < N)
        Set(N - 1, 0);
}
#include "Brunolib.h"


long long Bruno( int N, int A[] ) {
    long long cnt = 0;
    long long X = 0;

    for(int i = 0; i < N - 1; i++) {
        if(A[i] == 1 && A[i + 1] == 1) {
            X += (1ll << cnt);
            cnt++;
            i++;
        }
        else if(A[i] == 1) {
            cnt++;
            i++;
        }
    }
    return X;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 45 ms 3056 KB Output isn't correct - L* = 0
2 Incorrect 48 ms 3552 KB Output isn't correct - L* = 0
3 Incorrect 50 ms 3552 KB Output isn't correct - L* = 0
4 Incorrect 44 ms 3552 KB Output isn't correct - L* = 0
5 Incorrect 48 ms 3552 KB Output isn't correct - L* = 0
6 Incorrect 56 ms 3688 KB Output isn't correct - L* = 0
7 Incorrect 60 ms 3688 KB Output isn't correct - L* = 0
8 Incorrect 59 ms 3688 KB Output isn't correct - L* = 0
9 Incorrect 53 ms 3936 KB Output isn't correct - L* = 0
10 Incorrect 55 ms 3936 KB Output isn't correct - L* = 0
11 Incorrect 51 ms 3936 KB Output isn't correct - L* = 0
12 Incorrect 50 ms 3936 KB Output isn't correct - L* = 0
13 Incorrect 46 ms 3936 KB Output isn't correct - L* = 0
14 Incorrect 50 ms 3936 KB Output isn't correct - L* = 0
15 Incorrect 46 ms 3936 KB Output isn't correct - L* = 0
16 Incorrect 53 ms 3936 KB Output isn't correct - L* = 0
17 Incorrect 73 ms 3936 KB Output isn't correct - L* = 0
18 Incorrect 49 ms 3936 KB Output isn't correct - L* = 0
19 Incorrect 48 ms 3936 KB Output isn't correct - L* = 0
20 Incorrect 71 ms 3936 KB Output isn't correct - L* = 0
21 Incorrect 46 ms 3936 KB Output isn't correct - L* = 0
22 Incorrect 53 ms 3936 KB Output isn't correct - L* = 0
23 Incorrect 67 ms 3936 KB Output isn't correct - L* = 0
24 Incorrect 50 ms 4064 KB Output isn't correct - L* = 0
25 Incorrect 61 ms 4064 KB Output isn't correct - L* = 0
26 Incorrect 47 ms 4064 KB Output isn't correct - L* = 0
27 Incorrect 66 ms 4064 KB Output isn't correct - L* = 0
28 Incorrect 44 ms 4064 KB Output isn't correct - L* = 0
29 Incorrect 49 ms 4064 KB Output isn't correct - L* = 0
30 Incorrect 54 ms 4064 KB Output isn't correct - L* = 0
31 Incorrect 51 ms 4064 KB Output isn't correct - L* = 0
32 Incorrect 52 ms 4064 KB Output isn't correct - L* = 0
33 Incorrect 56 ms 4064 KB Output isn't correct - L* = 0
34 Incorrect 50 ms 4064 KB Output isn't correct - L* = 0
35 Incorrect 43 ms 4064 KB Output isn't correct - L* = 0
36 Incorrect 44 ms 4064 KB Output isn't correct - L* = 0
37 Incorrect 44 ms 4064 KB Output isn't correct - L* = 0
38 Incorrect 40 ms 4064 KB Output isn't correct - L* = 0
39 Incorrect 55 ms 4064 KB Output isn't correct - L* = 0
40 Incorrect 55 ms 4064 KB Output isn't correct - L* = 0