(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #985145

#TimeUsernameProblemLanguageResultExecution timeMemory
985145CrazyBotBoyAlice, Bob, and Circuit (APIO23_abc)C++17
Compilation error
0 ms0 KiB
#include <vector> #include <unordered_map> #include <algorithm> #include <iostream> using namespace std; int sequence(int N, vector<int> A) { int maxOccurrences = 0; for (int l = 0; l < N; ++l) { unordered_map<int, int> freq; vector<int> subarray; for (int r = l; r < N; ++r) { subarray.push_back(A[r]); freq[A[r]]++; vector<int> temp = subarray; sort(temp.begin(), temp.end()); int k = temp.size(); int median1 = temp[(k - 1) / 2]; int median2 = temp[k / 2]; maxOccurrences = max(maxOccurrences, freq[median1]); if (median1 != median2) { maxOccurrences = max(maxOccurrences, freq[median2]); } } } return maxOccurrences; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccW4nvBF.o: in function `int grader_entry<bob()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1}>(bob()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1} const&) [clone .isra.0]':
stub.cpp:(.text+0xb8b): undefined reference to `bob(int, char const (*) [5], char const (*) [5], bool*)'
/usr/bin/ld: /tmp/ccW4nvBF.o: in function `int grader_entry<alice()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1}>(alice()::{lambda(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&)#1} const&) [clone .isra.0]':
stub.cpp:(.text+0xf93): undefined reference to `alice(int, char const (*) [5], unsigned short const*, bool*)'
/usr/bin/ld: /tmp/ccW4nvBF.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