Submission #797648

#TimeUsernameProblemLanguageResultExecution timeMemory
797648ChrisM2309Thousands Islands (IOI22_islands)C++17
6.75 / 100
24 ms4384 KiB
#include <bits/stdc++.h> using namespace std; variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V){ int cont0 = 0, cont1 = 0; int b1 = -1, b2 = -1, b3 = -1; for (int i = 0; i < M; i++){ if(U[i] == 0){ cont0++; if(b1==-1) b1 = i; else b2 = i; } else { cont1++; b3 = i; } } if(cont0 > 1 and cont1 > 0){ vector<int> ans = {b1, b3, b2, b1, b3, b2}; return ans; } 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...