Submission #693879

#TimeUsernameProblemLanguageResultExecution timeMemory
693879PyqeThousands Islands (IOI22_islands)C++17
3.50 / 100
39 ms9644 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; 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}); } if(al[1].size()<2||al[2].size()<1) { return false; } sq.push_back(al[1][0].sc); sq.push_back(al[2][0].sc); sq.push_back(al[1][1].sc); sq.push_back(al[1][0].sc); sq.push_back(al[2][0].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...