# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
427114 | 2021-06-14T12:28:27 Z | A_D | Simurgh (IOI17_simurgh) | C++14 | 0 ms | 0 KB |
#include "simurgh.h" #include <bits/stdc++.h> using namespace std; int nn,mm; vector<int> ret; vector<int> vec; vector<int> vec2; void bc(int i) { if(i==mm){ if(vec.size()==nn-1){ vec2=vec; int ans=count_common_roads(vec2); if(ans==nn-1)ret=vec; } return; } vec.push_back(i); bx(i+1); vec.pop_back(); bc(i+1); } vector<int> find_roads(int n,vector<int> u,vector<int> v){ ret.clear();vec.clear(); nn=n; mm=u.size(); bc(0); sort(ret.begin(),ret.end()); return ret; }