# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
613737 | 2022-07-30T09:59:33 Z | Mr_Husanboy | Simurgh (IOI17_simurgh) | C++14 | 0 ms | 212 KB |
#include "simurgh.h" #include<bits/stdc++.h> using namespace std; #define all(a) (a).begin(), (a).end() #define vi vector<int> #define ff first #define ss second vector<pair<int,int>> g[500]; vector<int> find_roads(int n, vector<int> u, vector<int> v) { vector<int> p; for(int i=0; i<u.size(); i++){ g[u[i]].push_back({v[i],i}); g[v[i]].emplace_back(u[i],i); } for(int i=0; i<n; i++) p.push_back(i); do{ bool ok = 1; vector<int> tem; for(int i=1; i<n && ok; i++){ bool found = 0; for(auto u : g[p[i]]){ if(u.ff == p[i-1]){ found = 1; //tem.push_back(u.ss); } } ok &= found; } //for(auto u:tem) cout << u << ' '; cout << ok<<"tem" << endl; if(ok){ if(count_common_roads(tem) == n-1) return tem; } }while(next_permutation(all(p))); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |