Submission #797579

#TimeUsernameProblemLanguageResultExecution timeMemory
797579XJP12수천개의 섬 (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, vector<int>) vector<int> find_journey(int n, int m, vector<int> u, vector<int> v){
	bool ban=false;
	int ban1=0;
	int a=-1,b=-1,c=-1;
	for(int i=0; i<m; i++){
		if(u[i]==0){
			ban1++;
			if(a==-1){
				a=i;
			}else{
				b=i;
			}
		}else{
			ban=true;
			c=i;
		}
	}
	vector<int> x(6);
	if(ban==false && ban1>1){
		x={a,c,b,a,c,b};
		return x;
	}else{
		return false;
	}
}

Compilation message (stderr)

islands.cpp:6:6: error: expected identifier before '(' token
    6 | union(bool, vector<int>) vector<int> find_journey(int n, int m, vector<int> u, vector<int> v){
      |      ^
islands.cpp:6:7: error: expected unqualified-id before 'bool'
    6 | union(bool, vector<int>) vector<int> find_journey(int n, int m, vector<int> u, vector<int> v){
      |       ^~~~
islands.cpp:6:7: error: expected ')' before 'bool'
    6 | union(bool, vector<int>) vector<int> find_journey(int n, int m, vector<int> u, vector<int> v){
      |      ~^~~~
      |       )