Submission #797618

#TimeUsernameProblemLanguageResultExecution timeMemory
797618Joshi503Thousands Islands (IOI22_islands)C++17
Compilation error
0 ms0 KiB
// Source: https://usaco.guide/general/io #include <bits/stdc++.h> using namespace std; union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){ if(N == 2){ if(M == 1) return false; int ida = -1, regreso = -1; for(int i = 0; i < m; i++){ if(U[i] == 0 && V[i] == 1) ida = i; if(U[i] == 1 && V[i] == 0) regreso = i; } if(ida == -1) return 0; if(regreso != -1){ return [ida, regreso]; } return [0, 1, 0]; } }

Compilation message (stderr)

islands.cpp:6:6: error: expected identifier before '(' token
    6 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |      ^
islands.cpp:6:7: error: expected unqualified-id before 'bool'
    6 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |       ^~~~
islands.cpp:6:7: error: expected ')' before 'bool'
    6 | union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
      |      ~^~~~
      |       )