제출 #696506

#제출 시각아이디문제언어결과실행 시간메모리
696506pls33앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; //?????????????????????????? #ifndef _AAAAAAAAA #include "decoder.h" #include "decoderlib.h" #else void decode(int N, int L, int X[]); void encode(int N, int M[]); void output(int b); void send(int a); #endif #pragma region dalykai using p32 = pair<int, int>; using p32u = pair<uint32_t, uint32_t>; using p64 = pair<int64_t, int64_t>; using p64u = pair<uint64_t, uint64_t>; using vi16 = vector<int16_t>; using vi16u = vector<uint16_t>; using vi32 = vector<int>; using vi32u = vector<uint32_t>; using vi64 = vector<int64_t>; using vi64u = vector<uint64_t>; using vp32 = vector<p32>; using vp32u = vector<p32u>; using vp64 = vector<p64>; using vp64u = vector<p64u>; using vvi32 = vector<vi32>; using vvi32u = vector<vi32u>; using vvi64 = vector<vi64>; using vvi64u = vector<vi64u>; using vvp32 = vector<vp32>; using vvp32u = vector<vp32u>; using vvp64 = vector<vp64>; using vvp64u = vector<vp64u>; #pragma endregion using _bit = bitset<512>; // uaim const _bit noise("00100001110001111100110111000111001011100001010110101001001010001010111011010100110101000001011100011000000100110100100101110000100100110101110000101011011100111101101010001111001101100101101010110100101001110101101011101000111101110010000100110001000010000000001101010111010101111001000111100101100110001001000011001110111111111111111001110100111000101001000111001100000010111110100111111100100110010110000111001100110110010100111111011110000001110111011110101010110010011011010100010010111000100000100011100000"); void decode(int N, int L, int X[]) { _bit a; vi16 count(256); for (int i = 0; i < L; i++) { count[X[i]]++; } for (int i = 0; i < 256; i++) { a[i] = bool(count[i] & 1) ^ noise[i]; a[i + 256] = bool(count[i] & 2) ^ noise[i + 256]; } vi32 things_a; for (int i = 0; i < N; i++) { int val = 0; for (int j = 0; j < 8; j++) { val |= a[j] << j; } things_a.push_back(val); a >>= 8; } for (int i = (int)things_a.size() - 1; i >= 0; i--) { output(things_a[i]); } }
#include <bits/stdc++.h> using namespace std; //?????????????????????????? #ifndef _AAAAAAAAA #include "decoder.h" #include "decoderlib.h" #else void decode(int N, int L, int X[]); void encode(int N, int M[]); void output(int b); void send(int a); #endif #pragma region dalykai using p32 = pair<int, int>; using p32u = pair<uint32_t, uint32_t>; using p64 = pair<int64_t, int64_t>; using p64u = pair<uint64_t, uint64_t>; using vi16 = vector<int16_t>; using vi16u = vector<uint16_t>; using vi32 = vector<int>; using vi32u = vector<uint32_t>; using vi64 = vector<int64_t>; using vi64u = vector<uint64_t>; using vp32 = vector<p32>; using vp32u = vector<p32u>; using vp64 = vector<p64>; using vp64u = vector<p64u>; using vvi32 = vector<vi32>; using vvi32u = vector<vi32u>; using vvi64 = vector<vi64>; using vvi64u = vector<vi64u>; using vvp32 = vector<vp32>; using vvp32u = vector<vp32u>; using vvp64 = vector<vp64>; using vvp64u = vector<vp64u>; #pragma endregion using _bit = bitset<512>; // uaim const _bit noise("00100001110001111100110111000111001011100001010110101001001010001010111011010100110101000001011100011000000100110100100101110000100100110101110000101011011100111101101010001111001101100101101010110100101001110101101011101000111101110010000100110001000010000000001101010111010101111001000111100101100110001001000011001110111111111111111001110100111000101001000111001100000010111110100111111100100110010110000111001100110110010100111111011110000001110111011110101010110010011011010100010010111000100000100011100000"); void decode(int N, int L, int X[]) { _bit a; vi16 count(256); for (int i = 0; i < L; i++) { count[X[i]]++; } for (int i = 0; i < 256; i++) { a[i] = bool(count[i] & 1) ^ noise[i]; a[i + 256] = bool(count[i] & 2) ^ noise[i + 256]; } vi32 things_a; for (int i = 0; i < N; i++) { int val = 0; for (int j = 0; j < 8; j++) { val |= a[j] << j; } things_a.push_back(val); a >>= 8; } for (int i = (int)things_a.size() - 1; i >= 0; i--) { output(things_a[i]); } }

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

encoder.cpp:14: warning: ignoring '#pragma region dalykai' [-Wunknown-pragmas]
   14 | #pragma region dalykai
      | 
encoder.cpp:37: warning: ignoring '#pragma endregion ' [-Wunknown-pragmas]
   37 | #pragma endregion
      | 
/usr/bin/ld: /tmp/ccwTNqYx.o: in function `decode(int, int, int*)':
encoder.cpp:(.text+0x25c): undefined reference to `output(int)'
/usr/bin/ld: /tmp/cc7Dq0sv.o: in function `main':
grader_encoder.cpp:(.text.startup+0x162): undefined reference to `encode(int, int*)'
collect2: error: ld returned 1 exit status

decoder.cpp:14: warning: ignoring '#pragma region dalykai' [-Wunknown-pragmas]
   14 | #pragma region dalykai
      | 
decoder.cpp:37: warning: ignoring '#pragma endregion ' [-Wunknown-pragmas]
   37 | #pragma endregion
      |