# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1089924 | Jovica | Simurgh (IOI17_simurgh) | C++14 | 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;
#include "simurgh.h"
vector<int> odg;
void f(vector<int> v,int p,int m,int n)
{
if (p==m)
{
if (count(common_roads(v))==m-1) odg = v;
return;
}
f(v,p+1,m,n);
if (v.size()<n-1)
{
v.push_back(p);
f(v,p+1,m,n);
}
}
vector<int> find_roads(int n, vector<int> u, vector<int> v) {
f({},0,u.size(),n);
return odg;
}
/*
int main()
{
vector<int> odg = find_roads(4, [0, 0, 0, 1, 1, 2], [1, 2, 3, 2, 3, 3]);
for (int i=0;i<odg.size();i++) cout<<odg[i]<<" ";
return 0;
}*/