Submission #632148

#TimeUsernameProblemLanguageResultExecution timeMemory
632148Minindu2006Thousands Islands (IOI22_islands)C++17
0 / 100
1 ms596 KiB
#include "islands.h" #include<bits/stdc++.h> #include <variant> #include <vector> using namespace std; int n, m, can = -1; vector<int> u, v; vector<int> adj[1001]; void dfs(int node, vector<int> &ans); std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { n = N, m = M; U = u, v = V; if(m <= 2) return false; int z = 0; vector<int> cur(3); for(int i=0;i<m;i++) { if(u[i] == 0) { if(z < 2) cur[z] = i; z++; } else cur[2] = i; } if(z <= 1) return false; for(int i=0;i<3;i++) cur.push_back(cur[i]); return cur; }
#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...