Submission #1150524

#TimeUsernameProblemLanguageResultExecution timeMemory
1150524marvinthangQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int K = 12; vector <vector <bool>> a; int decode(int n, int x, int y) { if (a.empty()) { a.emplace_back(); vector <bool> b(K); fill(b.begin() + K / 2, b.end(), true); do a.push_back(b); while (next_permutation(b.begin(), b.end())); } for (int i = 0; i < K; ++i) if (a[x][i] && !a[y][i]) return i + 1; }
#include <bits/stdc++.h> using namespace std; const int K = 12; vector <vector <bool>> a; int decode(int n, int q, int h) { if (a.empty()) { a.emplace_back(); vector <bool> b(K); fill(b.begin() + K / 2, b.end(), true); do a.push_back(b); while (next_permutation(b.begin(), b.end())); } return a[q][h - 1]; }

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'int decode(int, int, int)':
encoder.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
/usr/bin/ld: /tmp/ccjQsLGh.o: in function `main':
grader_encode.c:(.text.startup+0x125): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status