# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
628674 | qwerasdfzxcl | Thousands Islands (IOI22_islands) | C++17 | 339 ms | 37784 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
pair<int, int> E[200200];
set<pair<int, int>> adj[100100], INV[100100];
vector<int> deg0, ansf, ansb;
int n, s, on[100100], visited[100100];
bool flag = 0;
vector<int> operator + (const vector<int> &a, const vector<int> &b){
vector<int> ret = a;
for (auto &x:b) ret.push_back(x);
return ret;
}
vector<int> rev(vector<int> a){reverse(a.begin(), a.end()); return a;}
void pop(int x){
auto [v, i] = *adj[x].begin();
adj[x].erase(adj[x].begin());
INV[v].erase(INV[v].find(make_pair(x, i)));
}
void _erase(int x){
if (!on[x]) return;
on[x] = 0;
for (auto &[v, i]:INV[x]){
adj[v].erase(adj[v].find(make_pair(x, i)));
# | 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... |