제출 #1034526

#제출 시각아이디문제언어결과실행 시간메모리
1034526irmuun수천개의 섬 (IOI22_islands)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "islands.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() const int maxn=2e5+5; int n,m; set<pair<int,int>>adj[maxn]; vector<int>ans,r; bool solve(int x,int p){ if(adj[x].size()==0) return false; if(adj[x].size()==1){ auto [y,sail]=*adj[x].begin(); adj[x].erase(adj[x].begin()); ans.pb(sail); r.pb(sail); return solve(y); } else{ auto [y,sail]=*adj[x].begin(); adj[x].erase(adj[x].begin()); auto [z,sail2]=*adj[x].begin(); adj[x].erase(adj[x].begin()); ans.pb(sail); ans.pb(sail^1); ans.pb(sail2); ans.pb(sail2^1); ans.pb(sail^1); ans.pb(sail); ans.pb(sail2^1); ans.pb(sail2); return true; } }

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

islands.cpp: In function 'bool solve(int, int)':
islands.cpp:26:23: error: too few arguments to function 'bool solve(int, int)'
   26 |         return solve(y);
      |                       ^
islands.cpp:19:6: note: declared here
   19 | bool solve(int x,int p){
      |      ^~~~~