Submission #837454

#TimeUsernameProblemLanguageResultExecution timeMemory
837454fatemetmhrThousands Islands (IOI22_islands)C++17
5 / 100
26 ms5172 KiB
// Be name khoda // #include "islands.h" #include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define debug(x) cerr << "(" << (#x) << "): " << (x) << endl; #define all(x) x.begin(), x.end() #define pb push_back #define mp make_pair #define fi first #define se second typedef long long ll; const int mod = 1e9 + 9; const int maxn5 = 1e5 + 10; std::variant<bool, std::vector<int>> find_journey( int n, int m, std::vector<int> u, std::vector<int> v) { if(n == 2){ vector <int> cnt[2], ret; for(int i = 0; i < m; i++){ cnt[u[i]].pb(i); } if(int(cnt[0].size()) < 2 || int(cnt[1].size()) < 1) return false; int a = cnt[0][0], b = cnt[0][1], c = cnt[1][0]; return vector <int> ({a, c, b, a, c, b}); } return false; }
#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...