답안 #70578

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
70578 2018-08-23T06:32:28 Z Inovak Broken Device (JOI17_broken_device) C++14
0 / 100
601 ms 4824 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;
    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 >= 60) {
            Set(i, 0);
            cerr << 0 << " ";
            cn++;
        }
        else {
            cerr << 1 << " " << ((X & (1ll << cnt)) ? 1 : 0) << " ";
            Set(i, 1);
            Set(i + 1, ((X & (1ll << cnt)) ? 1 : 0));
            cn += 2;
            cnt++;
            i++;
        }
    }
    if(cn < N)
        Set(N - 1, 0), cerr << 0 << " ";
   cerr << endl;
}
#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 Execution timed out 476 ms 3720 KB Time limit exceeded (wall clock)
2 Execution timed out 511 ms 3880 KB Time limit exceeded (wall clock)
3 Execution timed out 537 ms 4152 KB Time limit exceeded (wall clock)
4 Execution timed out 519 ms 4152 KB Time limit exceeded (wall clock)
5 Execution timed out 488 ms 4160 KB Time limit exceeded (wall clock)
6 Execution timed out 480 ms 4392 KB Time limit exceeded (wall clock)
7 Execution timed out 532 ms 4392 KB Time limit exceeded (wall clock)
8 Execution timed out 545 ms 4392 KB Time limit exceeded (wall clock)
9 Execution timed out 516 ms 4392 KB Time limit exceeded (wall clock)
10 Execution timed out 561 ms 4392 KB Time limit exceeded (wall clock)
11 Execution timed out 555 ms 4392 KB Time limit exceeded (wall clock)
12 Execution timed out 500 ms 4568 KB Time limit exceeded (wall clock)
13 Execution timed out 546 ms 4568 KB Time limit exceeded (wall clock)
14 Execution timed out 486 ms 4568 KB Time limit exceeded (wall clock)
15 Execution timed out 481 ms 4568 KB Time limit exceeded (wall clock)
16 Execution timed out 507 ms 4616 KB Time limit exceeded (wall clock)
17 Execution timed out 502 ms 4616 KB Time limit exceeded (wall clock)
18 Execution timed out 493 ms 4616 KB Time limit exceeded (wall clock)
19 Execution timed out 481 ms 4616 KB Time limit exceeded (wall clock)
20 Execution timed out 487 ms 4616 KB Time limit exceeded (wall clock)
21 Execution timed out 537 ms 4712 KB Time limit exceeded (wall clock)
22 Execution timed out 523 ms 4712 KB Time limit exceeded (wall clock)
23 Execution timed out 601 ms 4712 KB Time limit exceeded (wall clock)
24 Execution timed out 587 ms 4824 KB Time limit exceeded (wall clock)
25 Execution timed out 523 ms 4824 KB Time limit exceeded (wall clock)
26 Execution timed out 561 ms 4824 KB Time limit exceeded (wall clock)
27 Execution timed out 535 ms 4824 KB Time limit exceeded (wall clock)
28 Execution timed out 506 ms 4824 KB Time limit exceeded (wall clock)
29 Execution timed out 575 ms 4824 KB Time limit exceeded (wall clock)
30 Execution timed out 531 ms 4824 KB Time limit exceeded (wall clock)
31 Execution timed out 487 ms 4824 KB Time limit exceeded (wall clock)
32 Execution timed out 543 ms 4824 KB Time limit exceeded (wall clock)
33 Execution timed out 558 ms 4824 KB Time limit exceeded (wall clock)
34 Execution timed out 552 ms 4824 KB Time limit exceeded (wall clock)
35 Execution timed out 517 ms 4824 KB Time limit exceeded (wall clock)
36 Execution timed out 510 ms 4824 KB Time limit exceeded (wall clock)
37 Execution timed out 508 ms 4824 KB Time limit exceeded (wall clock)
38 Execution timed out 511 ms 4824 KB Time limit exceeded (wall clock)
39 Execution timed out 514 ms 4824 KB Time limit exceeded (wall clock)
40 Execution timed out 487 ms 4824 KB Time limit exceeded (wall clock)