답안 #578501

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
578501 2022-06-17T06:25:05 Z alireza_kaviani Broken Device (JOI17_broken_device) C++17
0 / 100
42 ms 2684 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll LOG = 60;
const ll MAXN = 150;

static int mark[MAXN];

void Anna(int N, ll x, int K, int P[]){
    for(int i = 0 ; i < K ; i++){
        mark[P[i]] = 1;
    }
    for(int i = 0 ; i < N ; i += 2){
        if(mark[i] || mark[i + 1]){
            Set(i , 0);
            Set(i + 1 , 0);
            continue;
        }
        if(x % 3 == 0){
            Set(i , 1);
            Set(i + 1 , 0);
        }
        if(x % 3 == 1){
            Set(i , 0);
            Set(i + 1 , 1);
        }
        if(x % 3 == 2){
            Set(i , 1);
            Set(i + 1 , 1);
        }
        x /= 3;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll LOG = 60;
const ll MAXN = 150;

long long Bruno(int N, int A[]){
    ll ans = 0 , val = 1;
    for(int i = 0 ; i < N ; i += 2){
        if(A[i] == 0 && A[i + 1] == 0){
            continue;
        }
        ans += (A[i] + A[i + 1] * 2 - 1) * val;
        val *= 3;
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 38 ms 2412 KB Output isn't correct - L* = 0
2 Partially correct 39 ms 2596 KB Output isn't correct - L* = 0
3 Partially correct 38 ms 2468 KB Output isn't correct - L* = 0
4 Partially correct 30 ms 2480 KB Output isn't correct - L* = 0
5 Partially correct 30 ms 2412 KB Output isn't correct - L* = 0
6 Partially correct 39 ms 2480 KB Output isn't correct - L* = 0
7 Partially correct 30 ms 2584 KB Output isn't correct - L* = 0
8 Partially correct 36 ms 2640 KB Output isn't correct - L* = 0
9 Partially correct 40 ms 2528 KB Output isn't correct - L* = 0
10 Partially correct 33 ms 2532 KB Output isn't correct - L* = 0
11 Partially correct 30 ms 2616 KB Output isn't correct - L* = 0
12 Partially correct 28 ms 2588 KB Output isn't correct - L* = 0
13 Partially correct 30 ms 2548 KB Output isn't correct - L* = 0
14 Partially correct 33 ms 2452 KB Output isn't correct - L* = 0
15 Partially correct 34 ms 2480 KB Output isn't correct - L* = 0
16 Partially correct 30 ms 2484 KB Output isn't correct - L* = 0
17 Partially correct 39 ms 2636 KB Output isn't correct - L* = 0
18 Partially correct 35 ms 2460 KB Output isn't correct - L* = 0
19 Partially correct 33 ms 2528 KB Output isn't correct - L* = 0
20 Partially correct 32 ms 2516 KB Output isn't correct - L* = 0
21 Partially correct 30 ms 2468 KB Output isn't correct - L* = 0
22 Partially correct 31 ms 2544 KB Output isn't correct - L* = 0
23 Partially correct 35 ms 2656 KB Output isn't correct - L* = 0
24 Partially correct 32 ms 2488 KB Output isn't correct - L* = 0
25 Partially correct 40 ms 2544 KB Output isn't correct - L* = 0
26 Partially correct 33 ms 2412 KB Output isn't correct - L* = 0
27 Partially correct 30 ms 2584 KB Output isn't correct - L* = 0
28 Partially correct 34 ms 2520 KB Output isn't correct - L* = 0
29 Partially correct 31 ms 2536 KB Output isn't correct - L* = 0
30 Partially correct 31 ms 2456 KB Output isn't correct - L* = 0
31 Partially correct 33 ms 2584 KB Output isn't correct - L* = 0
32 Partially correct 34 ms 2572 KB Output isn't correct - L* = 0
33 Partially correct 28 ms 2480 KB Output isn't correct - L* = 0
34 Partially correct 31 ms 2684 KB Output isn't correct - L* = 0
35 Partially correct 34 ms 2480 KB Output isn't correct - L* = 0
36 Partially correct 31 ms 2472 KB Output isn't correct - L* = 0
37 Partially correct 32 ms 2488 KB Output isn't correct - L* = 0
38 Partially correct 42 ms 2452 KB Output isn't correct - L* = 0
39 Partially correct 39 ms 2520 KB Output isn't correct - L* = 0
40 Partially correct 30 ms 2596 KB Output isn't correct - L* = 0