제출 #797593

#제출 시각아이디문제언어결과실행 시간메모리
797593Osplei수천개의 섬 (IOI22_islands)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<vii> wgraf; typedef pair<int,ii> edge; typedef vector <ll> vl; typedef pair <ll, ll> LL; typedef vector <LL> vll; #define UNVISITED 0 #define VISITED 1 #define pb push_back #define F first #define S second union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){ vector <int> ans; if (N==2){ if ((U[0]>=2 && V[1]>=1) || (V[0]>=2 && U[1]>=1)) { ans.pb(1); ans.pb(0); ans.pb(1); ans.pb(0); ans.pb(1); ans.pb(0); return ans; } else return ans; } else return ans; }

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

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