제출 #693885

#제출 시각아이디문제언어결과실행 시간메모리
693885Pyqe수천개의 섬 (IOI22_islands)C++17
1.75 / 100
33 ms9164 KiB
#include <bits/stdc++.h> #include "islands.h" using namespace std; #define mp make_pair #define fr first #define sc second const long long inf=1e18; long long n,m; pair<long long,long long> ed[100069]; vector<pair<long long,long long>> al[100069]; variant<bool,vector<int>> find_journey(int on,int om,vector<int> ka,vector<int> la) { long long i,k,l; vector<int> sq; n=on; if(n==2) { return false; } m=om; for(i=1;i<=m;i++) { k=ka[i-1]+1; l=la[i-1]+1; ed[i]={k,l}; al[k].push_back({l,i-1}); } for(i=1;i<=n;i++) { sort(al[i].begin(),al[i].end()); } sq.push_back(al[1][0].sc); sq.push_back(al[2][1].sc); sq.push_back(al[3][1].sc); sq.push_back(al[1][0].sc); sq.push_back(al[1][1].sc); sq.push_back(al[2][1].sc); sq.push_back(al[3][1].sc); sq.push_back(al[1][1].sc); return sq; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...