# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
628577 | c28dnv9q3 | Thousands Islands (IOI22_islands) | C++17 | 31 ms | 5580 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "islands.h"
#include <variant>
#include <vector>
#include <map>
#include <queue>
using namespace std;
vector<int> U, V;
int N, M;
vector<vector<int>> adj;
bool path_exists(int target) {
vector<bool> vis(N);
queue<int> q;
q.push(0);
vis[0] = true;
while (!q.empty()) {
int x = q.front(); q.pop();
if (x == target) return true;
for (auto c : adj[x]) {
if (!vis[V[c]]) {
vis[V[c]] = true;
q.push(V[c]);
}
}
}
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... |