Submission #68690

#TimeUsernameProblemLanguageResultExecution timeMemory
68690mirbek01Simurgh (IOI17_simurgh)C++17
0 / 100
3 ms412 KiB
#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; int m = u.size(); for(int i = 0; i < n - 1; i ++) ans.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] = j; int cn = count_common_roads(ans); if(cn > cnt){ break; } ans[i] = k; } } } sort(ans.begin(), ans.end()); return ans; }

Compilation message (stderr)

simurgh.cpp: In function 'std::vector<int> find_roads(int, std::vector<int>, std::vector<int>)':
simurgh.cpp:16:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int i = 0; i < ans.size(); i ++){
                            ~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...