Submission #797586

#TimeUsernameProblemLanguageResultExecution timeMemory
797586elpro123Thousands Islands (IOI22_islands)C++17
Compilation error
0 ms0 KiB
union<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
    if (N == 2) {
        vector<int> a, b;
        for (int i = 0; i < M; i++) {
            if (U[i] == 0) {
                a.push_back(i);
            } else {
                b.push_back(i);
            }
        }
        if (a.size() >= 2 && b.size() >= 1) {
            return vector{a[0], b[0], a[1], a[0], b[0], a[1]};
        } else {
            return false;
        }
    }
   }

Compilation message (stderr)

islands.cpp:1:6: error: expected identifier before '<' token
    1 | union<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
      |      ^
islands.cpp:1:6: error: expected unqualified-id before '<' token