답안 #68002

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
68002 2018-08-15T18:11:24 Z elitewantsyou Broken Device (JOI17_broken_device) C++14
0 / 100
80 ms 3976 KB
#include <bits/stdc++.h>
#include "Annalib.h"

using namespace std;

int gg[1111];

void Anna( int N, long long X, int K, int P[] )
{
        vector < int > v;
        for(int i = 0; i < K; i++){
                gg[P[i]] = 1;
        }
        for(int i = 0; i < N; i += 2){
                if(gg[i] == 0 && gg[i + 1] == 0){
                        v.push_back(i);
                }
        }
        for(int i = 0; i < N; i++){
                gg[i] = 0;
        }
        for(int i = 0; i < v.size(); i++){
                gg[v[i]] = 1;
                if(X & (1ll << i)){
                        gg[v[i] + 1] = 1;
                }
        }
        for(int i = 0; i < N; i++){
                Set(i, gg[i]);
        }
}
#include "Brunolib.h"

long long Bruno( int N, int A[] )
{
        long long X = 0;
        int c = 0, g = 0;
        for(int i = 0; i < N; i += 2){
                if(A[i]){
                        X += (1ll << i) * A[i + 1];
                }
        }
        return X;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:22:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < v.size(); i++){
                        ~~^~~~~~~~~~

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:6:13: warning: unused variable 'c' [-Wunused-variable]
         int c = 0, g = 0;
             ^
Bruno.cpp:6:20: warning: unused variable 'g' [-Wunused-variable]
         int c = 0, g = 0;
                    ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 56 ms 3056 KB Output isn't correct - L* = 0
2 Incorrect 54 ms 3440 KB Output isn't correct - L* = 0
3 Incorrect 69 ms 3440 KB Output isn't correct - L* = 0
4 Incorrect 56 ms 3976 KB Output isn't correct - L* = 0
5 Incorrect 53 ms 3976 KB Output isn't correct - L* = 0
6 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
7 Incorrect 48 ms 3976 KB Output isn't correct - L* = 0
8 Incorrect 43 ms 3976 KB Output isn't correct - L* = 0
9 Incorrect 69 ms 3976 KB Output isn't correct - L* = 0
10 Incorrect 52 ms 3976 KB Output isn't correct - L* = 0
11 Incorrect 80 ms 3976 KB Output isn't correct - L* = 0
12 Incorrect 66 ms 3976 KB Output isn't correct - L* = 0
13 Incorrect 48 ms 3976 KB Output isn't correct - L* = 0
14 Incorrect 47 ms 3976 KB Output isn't correct - L* = 0
15 Incorrect 46 ms 3976 KB Output isn't correct - L* = 0
16 Incorrect 48 ms 3976 KB Output isn't correct - L* = 0
17 Incorrect 49 ms 3976 KB Output isn't correct - L* = 0
18 Incorrect 78 ms 3976 KB Output isn't correct - L* = 0
19 Incorrect 79 ms 3976 KB Output isn't correct - L* = 0
20 Incorrect 49 ms 3976 KB Output isn't correct - L* = 0
21 Incorrect 55 ms 3976 KB Output isn't correct - L* = 0
22 Incorrect 48 ms 3976 KB Output isn't correct - L* = 0
23 Incorrect 52 ms 3976 KB Output isn't correct - L* = 0
24 Incorrect 55 ms 3976 KB Output isn't correct - L* = 0
25 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
26 Incorrect 66 ms 3976 KB Output isn't correct - L* = 0
27 Incorrect 51 ms 3976 KB Output isn't correct - L* = 0
28 Incorrect 41 ms 3976 KB Output isn't correct - L* = 0
29 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
30 Incorrect 41 ms 3976 KB Output isn't correct - L* = 0
31 Incorrect 45 ms 3976 KB Output isn't correct - L* = 0
32 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
33 Incorrect 43 ms 3976 KB Output isn't correct - L* = 0
34 Incorrect 45 ms 3976 KB Output isn't correct - L* = 0
35 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
36 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
37 Incorrect 45 ms 3976 KB Output isn't correct - L* = 0
38 Incorrect 44 ms 3976 KB Output isn't correct - L* = 0
39 Incorrect 56 ms 3976 KB Output isn't correct - L* = 0
40 Incorrect 46 ms 3976 KB Output isn't correct - L* = 0