Submission #946415

#TimeUsernameProblemLanguageResultExecution timeMemory
946415Nhoksocqt1Alice, Bob, and Circuit (APIO23_abc)C++17
Compilation error
0 ms0 KiB
#ifndef Nhoksocqt1 #include "abc.h" #endif // Nhoksocqt1 #include<bits/stdc++.h> using namespace std; #define inf 0x3f3f3f3f #define sz(x) int((x).size()) #define fi first #define se second #define names ajfhqwurhuqerw typedef long long ll; typedef pair<int, int> ii; template<class X, class Y> inline bool maximize(X &x, const Y &y) {return (x < y ? x = y, 1 : 0);} template<class X, class Y> inline bool minimize(X &x, const Y &y) {return (x > y ? x = y, 1 : 0);} mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int Random(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); } const int MAXN = 702; const int MAXM = 1003; string names[MAXN], letter[MAXM][2]; int n, m; int alice(const int n, const char names[][5], const unsigned short numbers[], bool outputs_alice[]) { int lA(0); outputs_alice[lA++] = 0; return lA; for (int i = 0; i < n; ++i) { bool check(0); for (int j = 0; j < 4; ++j) { int val = 26; if(!check) check |= (names[i][j] == '\0'); if(!check) val = names[i][j] - 'a'; for (int k = 4; k >= 0; --k) outputs_alice[lA++] = val >> k & 1; } for (int k = 15; k >= 0; --k) outputs_alice[lA++] = numbers[i] >> k & 1; } return lA; } int bob(const int m, const char send[][5], const char recei[][5], bool outputs_bob[]) { int lB(0); outputs_bob[lB++] = 1; return lB; for (int i = 0; i < m; ++i) { bool check(0); for (int j = 0; j < 4; ++j) { int val = 26; if(!check) check |= (send[i][j] == '\0'); if(!check) val = send[i][j] - 'a'; for (int k = 4; k >= 0; --k) outputs_bob[lB++] = val >> k & 1; } check = 0; for (int j = 0; j < 4; ++j) { int val = 26; if(!check) check |= (recei[i][j] == '\0'); if(!check) val = recei[i][j] - 'a'; for (int k = 4; k >= 0; --k) outputs_bob[lB++] = val >> k & 1; } } return lB; } int circuit(const int la, const int lb, int ope[], int gate[][2], bool outputs_circuit[][16]) { int l(la + lb); ope[l] = 5; gate[l][0] = 0, gate[l][1] = 0; ++l; for (int i = 0; i < la; ++i) { for (int j = 0; j < 16; ++j) outputs_circuit[i][j] = 0; } return l; } #ifdef Nhoksocqt1 int main(void) { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define TASK "abc" if(fopen(TASK".inp", "r")) { freopen(TASK".inp", "r", stdin); freopen(TASK".out", "w", stdout); } return 0; } #endif // Nhoksocqt1

Compilation message (stderr)

/usr/bin/ld: /tmp/ccgGaypu.o: in function `int grader_entry<circuit()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1}>(circuit()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1} const&) [clone .isra.0]':
stub.cpp:(.text+0x13dd): undefined reference to `circuit(int, int, int*, int (*) [2], int (*) [16])'
collect2: error: ld returned 1 exit status