제출 #561575

#제출 시각아이디문제언어결과실행 시간메모리
561575amunduzbaevBroken Device (JOI17_broken_device)C++17
컴파일 에러
0 ms0 KiB
#include "Brunolib.h" #include "bits/stdc++.h" using namespace std; long long Bruno( int n, int a[] ){ int b = 1, l = -1; const int M = 3; int val = 0, t = 0; for(int i=0;i<n && t < M;i++){ if(!a[i]) continue; if(a[i]){ val |= (a[i + 1] << t); t++, i++, l = i + 1; } } if(l == -1) return 0ll; b = val + 1; int bit = 0; long long x = 0; for(int i=l;i<n;i++){ if(a[i]){ for(int j=i+1;j<=i+b && bit < 60;j++){ x |= ((a[j] * 1ll) << bit); bit++; } i += b; } } //~ cout<<x<<endl; return x; }

컴파일 시 표준 에러 (stderr) 메시지

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

/usr/bin/ld: /tmp/ccEw4uQv.o: in function `main':
grader_bruno.cpp:(.text.startup+0x13d): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status