Submission #70306

#TimeUsernameProblemLanguageResultExecution timeMemory
70306Just_Solve_The_ProblemBroken Device (JOI17_broken_device)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "Brunolib.h" //#include "grader.cpp" #define ll long long #define pb push_back using namespace std; pair < int, int > get(int x, int y, int z) { int t = x * 4 + y * 2 + z; if (t == 0) return {0, 1}; if (t == 1) return {0, 2}; if (t == 2) return {1, 4}; if (t == 3) return {3, 4}; if (t == 4) return {1, 2}; if (t == 5) return {1, 4}; if (t == 6) return {0, 2}; if (t == 7) return {0, 4}; } long long Bruno( int N, int A[] ){ ll ret = 0; for (int i = N - 3; i >= 0; i -= 3) { ret = ret * get(A[i], A[i + 1], A[i + 2]).second + get(A[i], A[i + 1], A[i + 2]).first; } return ret; }

Compilation message (stderr)

Anna.cpp: In function 'std::pair<int, int> get(int, int, int)':
Anna.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/tmp/cc5WL1o9.o: In function `main':
grader_anna.c:(.text.startup+0xdc): undefined reference to `Anna(int, long long, int, int*)'
collect2: error: ld returned 1 exit status

/tmp/ccATxFjX.o: In function `main':
grader_bruno.cpp:(.text.startup+0x126): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status