제출 #709235

#제출 시각아이디문제언어결과실행 시간메모리
709235ssenseUnscrambling a Messy Bug (IOI16_messy)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "messy.h" #define startt ios_base::sync_with_stdio(false);cin.tie(0); typedef long long ll; using namespace std; #define vint vector<int> string convert(int x) { string now = "00000000"; for(int i = 0; i < 8; i++) { if(x&(1<<i)) { now[i]++; } } return now; } void restore_permutation(int n, int w, int r, int* ans) { string now = "00000000"; for(int i = 0; i < 7; i++) { now[i]++; add_element(now); } compile_set(); vector<vint> bits(8); for(int i = 1; i <= 256; i++) { bits[__builtin_popcount(i)].push_back(i); } int already = 0; int idx = 0; for(auto v : bits) { for(auto x : v) { if(check_element(convert(x))) { int acc = x-already; ans[idx] = 31-__builtin_clz(acc); already = x; break; } } idx++; } } /* int32_t main(){ startt int t = 1; //cin >> t; while (t--) { solve(); } } */

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

/usr/bin/ld: /tmp/ccrj5bhA.o: in function `main':
grader.cpp:(.text.startup+0x1b4): undefined reference to `restore_permutation(int, int, int)'
collect2: error: ld returned 1 exit status