답안 #21320

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
21320 2017-04-13T07:34:13 Z Ushio Broken Device (JOI17_broken_device) C++14
컴파일 오류
0 ms 0 KB
#include "Brunolib.h"
#include <algorithm>
#include <iostream>
using namespace std;

long long Bruno( int N, int A[] ){
    bool validity = true;
    int bit = 0;
    int64_t ans = 0;
    for (int i = 0; i < N; ++i) {
        if (validity) {
            validity = A[i] == 0;
        } else {
            if (bit <= 59) {
                ans |= ((int64_t) A[i]) << bit;
                ++bit;
            }
            validity = true;
        }
    }
    return ans;
}
#include "Brunolib.h"
#include <algorithm>
#include <iostream>
using namespace std;

long long Bruno( int N, int A[] ){
    bool validity = true;
    int bit = 0;
    int64_t ans = 0;
    for (int i = 0; i < N; ++i) {
        if (validity) {
            validity = A[i] == 0;
        } else {
            if (bit <= 59) {
                ans |= ((int64_t) A[i]) << bit;
                ++bit;
            }
            validity = true;
        }
    }
    cerr << "Out: " << ans << endl;
    return ans;
}

Compilation message

/tmp/ccNuU5Rd.o: In function `main':
grader_anna.c:(.text.startup+0xe4): undefined reference to `Anna(int, long long, int, int*)'
collect2: error: ld returned 1 exit status