Submission #1080024

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10800242024-08-29 06:24:17LittleOrangeThousands Islands (IOI22_islands)C++17
6.75 / 100
36 ms4556 KiB
#include "islands.h"
#include <variant>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
using ll = int;
std::variant<bool, std::vector<int>> find_journey(
int n, int m, std::vector<int> u, std::vector<int> v){
if (n == 2){
vector<ll> a,b;
for(ll i = 0;i<m;i++){
if (u[i]==0) a.push_back(i);
else b.push_back(i);
}
if (a.size()<2||b.size()<1) return false;
return vector<ll>({a[0],b[0],a[1],a[0],b[0],a[1]});
}
if(0){
vector<ll> a(6);
for(ll i = 0;i<m;i++){
if (u[i]==0&&v[i]==1) a[0] = i;
if (u[i]==1&&v[i]==2) a[1] = i;
if (u[i]==2&&v[i]==0) a[2] = i;
if (u[i]==0&&v[i]==2) a[3] = i;
if (u[i]==2&&v[i]==1) a[4] = i;
if (u[i]==1&&v[i]==0) a[5] = i;
}
return vector<ll>({a[0],a[1],a[2],a[3],a[4],a[5],a[2],a[1],a[0],a[5],a[4],a[3]});
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...