Submission #42805

# Submission time Handle Problem Language Result Execution time Memory
42805 2018-03-04T08:17:44 Z alenam0161 Simurgh (IOI17_simurgh) C++14
0 / 100
2 ms 432 KB
#include "simurgh.h"
using namespace std;
std::vector<int> find_roads(int n, std::vector<int> u, std::vector<int> v) {
	std::vector<int> r(n - 1);
	vector<int> ans;
	for (int i = 0; i < u.size(); ++i) {
		r.resize(0);
		for (int j = 0; j < n - 1; ++j)r.push_back(i);
		int k = count_common_roads(r);
		if (k == n - 1)ans.push_back(i);
	}
	return ans;
}

Compilation message

simurgh.cpp: In function 'std::vector<int> find_roads(int, std::vector<int>, std::vector<int>)':
simurgh.cpp:6:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < u.size(); ++i) {
                    ^
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 356 KB correct
2 Incorrect 2 ms 432 KB WA in grader: NO
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB WA in grader: NO
2 Halted 0 ms 0 KB -