Submission #1077012

#TimeUsernameProblemLanguageResultExecution timeMemory
1077012mariaclaraThousands Islands (IOI22_islands)C++17
6.75 / 100
31 ms6484 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define mk make_pair #define fr first #define sc second vector<vector<pii>> edges; variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) { edges.resize(N); for(int i = 0; i < M; i++) edges[U[i]].pb({V[i], i}); if(sz(edges[0]) < 2 or sz(edges[1]) < 1) return false; vector<int> ans; ans.pb(edges[0][0].sc); // 0 pra 1 ans.pb(edges[1][0].sc); // 1 pra 0 ans.pb(edges[0][1].sc); // 0 pra 1 ans.pb(edges[0][0].sc); // 1 pra 0 ans.pb(edges[1][0].sc); // 0 pra 1 ans.pb(edges[0][1].sc); // 1 pra 0 return ans; }
#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...