This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |