Submission #829621

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8296212023-08-18 13:26:07Abrar_Al_SamitKeys (IOI21_keys)C++17
37 / 100
192 ms20940 KiB
#include <bits/stdc++.h>
#include "keys.h"
using namespace std;
const int nax = 2000;
vector<pair<int,int>>g[nax];
vector<int>waiting[nax];
vector<int> find_reachable(vector<int> r, vector<int> u,
vector<int> v, vector<int> c) {
int n = r.size(), m = u.size();
for(int i=0; i<m; ++i) {
g[u[i]].emplace_back(v[i], c[i]);
g[v[i]].emplace_back(u[i], c[i]);
}
int cnt[n] = {0};
for(int sc=0; sc<n; ++sc) {
bool rc[n] = {0};
rc[sc] = 1;
bool key[n] = {0};
key[r[sc]] = 1;
for(int i=0; i<n; ++i) waiting[i].clear();
vector<int>yet = {sc};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...