답안 #100014

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
100014 2019-03-09T06:30:57 Z cheeheng Broken Device (JOI17_broken_device) C++14
0 / 100
63 ms 3072 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

//void Set( int pos, int bit );

void Anna( int N, long long X, int K, int P[] ){
    if(K >= -123){
        if(P[0] >= 60){
            for(int i = 0; i < 60; i ++){
                Set(i, (X&(1LL<<i)) != 0);
            }
            for(int i = 60; i < 150; i ++){
                Set(i, 0);
            }
        }else if(P[K-1] <= 89){
            for(int i = 0; i < 60; i ++){
                Set(i + 90, (X&(1LL<<i)) != 0);
            }
            for(int i = 0; i < 90; i ++){
                Set(i, 0);
            }
        }else{
            for(int i = 0; i < 150; i ++){
                Set(i, 0);
            }
        }
    }else{
        throw;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

long long Bruno( int N, int A[] ){
    long long X1 = 0;
    long long X2 = 0;
    for(int i = 0; i < 60; i ++){
        X1 |= ((long long)A[i]<<i);
    }
    for(int i = 0; i < 60; i ++){
        X2 |= ((long long)A[i+90]<<i);
    }
    if(X1 == 0 && X2 == 0){
        printf("%lld\n", 0);
        return 0LL;
    }else if(X1 == 0){
        printf("%lld\n", X2);
        return X2;
    }else{
        printf("%lld\n", X1);
        return X1;
    }
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:15:27: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
         printf("%lld\n", 0);
                           ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 50 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
2 Incorrect 46 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
3 Incorrect 43 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
4 Incorrect 41 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
5 Incorrect 46 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
6 Incorrect 53 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
7 Incorrect 39 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
8 Incorrect 37 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
9 Incorrect 36 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
10 Incorrect 38 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
11 Incorrect 39 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
12 Incorrect 44 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
13 Incorrect 41 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
14 Incorrect 37 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
15 Incorrect 34 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
16 Incorrect 35 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
17 Incorrect 34 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
18 Incorrect 61 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
19 Incorrect 39 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
20 Incorrect 38 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
21 Incorrect 56 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
22 Incorrect 50 ms 3064 KB Program terminated incorrectly, or you printed something to stdout
23 Incorrect 41 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
24 Incorrect 39 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
25 Incorrect 39 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
26 Incorrect 41 ms 3064 KB Program terminated incorrectly, or you printed something to stdout
27 Incorrect 54 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
28 Incorrect 55 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
29 Incorrect 43 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
30 Incorrect 41 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
31 Incorrect 41 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
32 Incorrect 41 ms 2864 KB Program terminated incorrectly, or you printed something to stdout
33 Incorrect 63 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
34 Incorrect 40 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
35 Incorrect 41 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
36 Incorrect 58 ms 3056 KB Program terminated incorrectly, or you printed something to stdout
37 Incorrect 39 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
38 Incorrect 45 ms 3000 KB Program terminated incorrectly, or you printed something to stdout
39 Incorrect 37 ms 3072 KB Program terminated incorrectly, or you printed something to stdout
40 Incorrect 41 ms 3056 KB Program terminated incorrectly, or you printed something to stdout