# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1051566 | MarwenElarbi | Keys (IOI21_keys) | C++17 | 0 ms | 0 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 <bits/stdc++.h>
using namespace std;
std::vector<int> find_reachable(std::vector<int> r, std::vector<int> u, std::vector<int> v, std::vector<int> c) {
std::vector<int> ans(r.size(),1);
int cnt=0;
for (int i = 0; i < (int)r.size(); ++i)
{
cnt+=(r[i]==0);
}
if(cnt==n||cnt==0) return ans;
for (int i = 0; i < (int)r.size(); ++i)
{
if(r[i]==0) ans[i]=0;
}
return ans;
}