답안 #100060

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
100060 2019-03-09T07:55:53 Z SomeoneUnknown Broken Device (JOI17_broken_device) C++14
0 / 100
77 ms 3096 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

void Anna( int N, long long X, int K, int P[] ){
    long long xpr = X;
    int pptr = 0;
    for( int i = 0; i < N; i+=3 ){
        //Set( i, 0 );
        int corrcount = 0;
        bool corecorr = false;
        int lm3 = xpr%3;
        while(P[pptr] < i+3){
            if(P[pptr] == i+lm3) corecorr = true;
            corrcount++;
            pptr++;
        }
        if(corrcount>1){
            for(int j = 0; j < 3; j++)
                Set(i+j, 0);
            continue;
        }
        if(corecorr){
            for(int j = 0; j < 3; j++)
                Set(i+j, j!=lm3);
        }else{
            for(int j = 0; j < 3; j++)
                Set(i+j, j==lm3);
        }
    }
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
    long long res = 0;
    bool clean = 0;
    int p0 = 0;
    int p1 = 0;
    for(int i = N-3; i >= 0; i-=3){
        for(int j = 0; j < 3; j++){
            if(A[i+j] == 1){
                clean++;
                p1 = j;
            }else{
                p0=j;
            }
        }
        if(clean == 0) continue;
        if(clean == 1){
            res *= 3;
            res += p1;
        }else{
            res *= 3;
            res += p0;
        }
    }
    return res;
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:11:22: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
                 clean++;
                      ^~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 55 ms 3072 KB Output isn't correct - L* = 0
2 Incorrect 41 ms 3064 KB Output isn't correct - L* = 0
3 Incorrect 47 ms 3056 KB Output isn't correct - L* = 0
4 Incorrect 38 ms 2992 KB Output isn't correct - L* = 0
5 Incorrect 44 ms 3056 KB Output isn't correct - L* = 0
6 Incorrect 65 ms 3000 KB Output isn't correct - L* = 0
7 Incorrect 43 ms 3056 KB Output isn't correct - L* = 0
8 Incorrect 48 ms 3000 KB Output isn't correct - L* = 0
9 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
10 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
11 Incorrect 43 ms 2912 KB Output isn't correct - L* = 0
12 Incorrect 49 ms 3056 KB Output isn't correct - L* = 0
13 Incorrect 44 ms 2872 KB Output isn't correct - L* = 0
14 Incorrect 51 ms 3072 KB Output isn't correct - L* = 0
15 Incorrect 45 ms 3096 KB Output isn't correct - L* = 0
16 Incorrect 59 ms 2952 KB Output isn't correct - L* = 0
17 Incorrect 57 ms 3056 KB Output isn't correct - L* = 0
18 Incorrect 52 ms 3000 KB Output isn't correct - L* = 0
19 Incorrect 46 ms 3072 KB Output isn't correct - L* = 0
20 Incorrect 51 ms 3072 KB Output isn't correct - L* = 0
21 Incorrect 50 ms 2984 KB Output isn't correct - L* = 0
22 Incorrect 61 ms 2976 KB Output isn't correct - L* = 0
23 Incorrect 52 ms 3056 KB Output isn't correct - L* = 0
24 Incorrect 77 ms 3056 KB Output isn't correct - L* = 0
25 Incorrect 43 ms 3056 KB Output isn't correct - L* = 0
26 Incorrect 63 ms 3040 KB Output isn't correct - L* = 0
27 Incorrect 56 ms 3056 KB Output isn't correct - L* = 0
28 Incorrect 59 ms 2944 KB Output isn't correct - L* = 0
29 Incorrect 44 ms 3024 KB Output isn't correct - L* = 0
30 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
31 Incorrect 51 ms 2816 KB Output isn't correct - L* = 0
32 Incorrect 69 ms 3056 KB Output isn't correct - L* = 0
33 Incorrect 50 ms 2896 KB Output isn't correct - L* = 0
34 Incorrect 48 ms 3008 KB Output isn't correct - L* = 0
35 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
36 Incorrect 54 ms 3016 KB Output isn't correct - L* = 0
37 Incorrect 36 ms 3000 KB Output isn't correct - L* = 0
38 Incorrect 43 ms 3000 KB Output isn't correct - L* = 0
39 Incorrect 41 ms 3016 KB Output isn't correct - L* = 0
40 Incorrect 40 ms 3048 KB Output isn't correct - L* = 0