제출 #797581

#제출 시각아이디문제언어결과실행 시간메모리
797581XJP12수천개의 섬 (IOI22_islands)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
struct ans{
	bool bani;
	vector<int> v;
};

struct ans 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);
	struc ans s;
	if(ban==false && ban1>1){
		x={a,c,b,a,c,b};
		s.bani=true;
		s.v=x;
		return s;
	}else{
		s.bani=false;
		return s;
	}
}

컴파일 시 표준 에러 (stderr) 메시지

islands.cpp:11:24: error: invalid declarator before 'find_journey'
   11 | struct ans vector<int> find_journey(int n, int m, vector<int> u, vector<int> v){
      |                        ^~~~~~~~~~~~