Submission #797566

#TimeUsernameProblemLanguageResultExecution timeMemory
797566XJP12Thousands Islands (IOI22_islands)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; union(bool, int[]) find_journey(int n, int m, int[] u, int[] v){ bool ban=false; int ban1=0; for(int i=0; i<m; i++){ if(u[i]==0){ ban1++; }else{ ban=true; } } int a[7]; //return {ban, a}; if(ban==false && ban1>1){ a={0,1,0,1,0,1,0}; return {true,a}; }else{ return {false,a}; } }

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){
      |      ~^~~~
      |       )