제출 #1104479

#제출 시각아이디문제언어결과실행 시간메모리
1104479M_W_13앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) int dp[11][5]; void preprocess() { rep(j, 4) { dp[10][j] = 4 - j; } for (int i = 9; i >= 1; i--) { rep(j, 4){ dp[i][j] = 0; for (int c = j; c < 4; c++) { dp[i][j] += dp[i + 1][c]; } // cout << "i = " << i << " j = " << j << " dp = " << dp[i][j] << '\n'; } } rep(i, 11) { dp[i][4] = 0; } // cout << "KON" << endl; } void encode(int n, int T[]) { preprocess(); rep(i, n) { int pot = 1 << 6; int it = 1; while (it <= 10) { int c = 3; while (dp[it][c] <= T[i]) { c--; } // cout << "c = " << c << " x = " << i + pot * c << endl; T[i] -= dp[it][c + 1]; send(i + pot * c); it++; } // cout << "WTH" << endl; } }

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

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