Submission #797596

#TimeUsernameProblemLanguageResultExecution timeMemory
797596elpro123Thousands Islands (IOI22_islands)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; union(bool, int[]) find_journey(int N, int M, int[] U, 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:4:6: error: expected identifier before '(' token
    4 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |      ^
islands.cpp:4:7: error: expected unqualified-id before 'bool'
    4 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |       ^~~~
islands.cpp:4:7: error: expected ')' before 'bool'
    4 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |      ~^~~~
      |       )