답안 #448132

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
448132 2021-07-29T03:03:59 Z JovanB Broken Device (JOI17_broken_device) C++17
0 / 100
2 ms 860 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

using ll = long long;

static const ll K = 626237348924392349LL;

static int radi[1005];

void Anna(int _n, long long X, int K, int P[] ){
    int n = _n;
    for(int i=0; i<n; i++) radi[i] = 1;
    for(int i=0; i<K; i++) radi[P[i]] = 0;
    X ^= K;
    int j = 0;
    for(int i=0; i<38; i++){
        int treba = X%3;
        X /= 3;
        treba++;
        for(;;){
            if(treba/2 <= radi[j] && treba%2 <= radi[j+1]){
                Set(j, treba/2);
                Set(j+1, treba%2);
                j += 2;
                break;
            }
            Set(j, 0);
            Set(j+1, 0);
            j += 2;
        }
    }
    while(j < n){
        Set(j, 0);
        j++;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

using ll = long long;

static const ll K = 626237348924392349LL;

long long Bruno( int N, int A[] ){
    int j = 0;
    ll p3 = 1;
    ll res = 0;
    for(int i=0; i<38; i++){
        int tr;
        for(;;){
            tr = 2*A[j] + A[j+1];
            j += 2;
            if(tr) break;
        }
        res += (tr-1)*p3;
        p3 *= 3;
    }
    return res ^ K;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 664 KB Wrong Answer [1]
2 Incorrect 1 ms 616 KB Wrong Answer [1]
3 Incorrect 1 ms 752 KB Wrong Answer [1]
4 Incorrect 1 ms 664 KB Wrong Answer [1]
5 Incorrect 1 ms 664 KB Wrong Answer [1]
6 Incorrect 1 ms 668 KB Wrong Answer [1]
7 Incorrect 1 ms 664 KB Wrong Answer [1]
8 Incorrect 1 ms 664 KB Wrong Answer [1]
9 Incorrect 1 ms 664 KB Wrong Answer [1]
10 Incorrect 1 ms 668 KB Wrong Answer [1]
11 Incorrect 1 ms 664 KB Wrong Answer [1]
12 Incorrect 1 ms 656 KB Wrong Answer [1]
13 Incorrect 1 ms 672 KB Wrong Answer [1]
14 Incorrect 1 ms 664 KB Wrong Answer [1]
15 Incorrect 1 ms 664 KB Wrong Answer [1]
16 Incorrect 1 ms 664 KB Wrong Answer [1]
17 Incorrect 2 ms 644 KB Wrong Answer [1]
18 Incorrect 1 ms 656 KB Wrong Answer [1]
19 Incorrect 1 ms 672 KB Wrong Answer [1]
20 Incorrect 1 ms 672 KB Wrong Answer [1]
21 Incorrect 1 ms 664 KB Wrong Answer [1]
22 Incorrect 1 ms 660 KB Wrong Answer [1]
23 Incorrect 1 ms 664 KB Wrong Answer [1]
24 Incorrect 1 ms 668 KB Wrong Answer [1]
25 Incorrect 1 ms 664 KB Wrong Answer [1]
26 Incorrect 1 ms 664 KB Wrong Answer [1]
27 Incorrect 2 ms 664 KB Wrong Answer [1]
28 Incorrect 2 ms 664 KB Wrong Answer [1]
29 Incorrect 1 ms 660 KB Wrong Answer [1]
30 Incorrect 1 ms 664 KB Wrong Answer [1]
31 Incorrect 1 ms 664 KB Wrong Answer [1]
32 Incorrect 1 ms 664 KB Wrong Answer [1]
33 Incorrect 1 ms 660 KB Wrong Answer [1]
34 Incorrect 1 ms 648 KB Wrong Answer [1]
35 Incorrect 2 ms 860 KB Wrong Answer [1]
36 Incorrect 1 ms 672 KB Wrong Answer [1]
37 Incorrect 1 ms 644 KB Wrong Answer [1]
38 Incorrect 1 ms 628 KB Wrong Answer [1]
39 Incorrect 1 ms 664 KB Wrong Answer [1]
40 Incorrect 1 ms 664 KB Wrong Answer [1]