# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
68691 | 2018-08-18T05:59:14 Z | mirbek01 | Simurgh (IOI17_simurgh) | C++17 | 3 ms | 484 KB |
#include "simurgh.h" #include <bits/stdc++.h> using namespace std; vector<int> find_roads(int n, vector<int> u, vector<int> v) { vector <int> ans, id; int m = u.size(); for(int i = 0; i < n - 1; i ++) ans.push_back(i); for(int i = 0; i < m; i ++) id.push_back(i); int ct = count_common_roads(ans); if(ct < n - 1){ for(int i = 0; i < ans.size(); i ++){ int cnt = count_common_roads(ans); for(int j = n - 1; j < m; j ++){ int k = ans[i]; ans[i] = id[j]; int cn = count_common_roads(ans); if(cn > cnt){ swap(id[i], id[j]); break; } ans[i] = k; } } } sort(ans.begin(), ans.end()); return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 248 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 248 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 248 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 484 KB | correct |
2 | Incorrect | 3 ms | 484 KB | WA in grader: NO |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 248 KB | WA in grader: NO |
2 | Halted | 0 ms | 0 KB | - |