# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1002559 | ZeroCool | Keys (IOI21_keys) | C++17 | 83 ms | 21076 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 <vector>
#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
#define ar array
vector<ar<int, 2>> g[N];
int n;
int A[N];
int bfs(int x){
vector<int> v[n];
bitset<N> vis, has;
queue<int>q;
q.push(x);
vis[x] = 1;
int cnt = 0;
while(q.size()){
int x = q.front();
q.pop();
cnt++;
if(!has[A[x]]){
has[A[x]] = 1;
for(auto u: v[A[x]]){
if(!vis[u]){
q.push(u);
vis[u] = 1;
# | 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... |