Submission #638723

#TimeUsernameProblemLanguageResultExecution timeMemory
638723aris12345678Thousands Islands (IOI22_islands)C++17
5 / 100
36 ms4472 KiB
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;

variant<bool, vector<int> > find_journey(int n, int m, vector<int> u, vector<int> v) {
    vector<int> front, back;
    for(int i = 0; i < m; i++) {
        if(u[i] == 0 && v[i] == 1)
            front.push_back(i);
        else
            back.push_back(i);
    }
    if((int)front.size() < 2 || (int)back.size() < 1)
        return false;
    vector<int> ans;
    for(int i = 0; i < 2; i++) {
        ans.push_back(front[0]);
        ans.push_back(back[0]);
        ans.push_back(front[1]);
    }
    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...