Submission #1074669

#TimeUsernameProblemLanguageResultExecution timeMemory
1074669NicolaikrobThousands Islands (IOI22_islands)C++17
0 / 100
37 ms3156 KiB
#include "islands.h" #include <variant> #include <vector> std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { int b1 = -1, b2 = -1; for(int i = 0; i < U.size(); i++) { if(U[i] == 0) b1 = i; if(U[i] == 1) b2 = i; } if(b1 == -1 || b2 == -1) return false; std::vector<int> T = {b1, b2}; return T; if (N == 4) { return std::vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3}); } return false; }

Compilation message (stderr)

islands.cpp: In function 'std::variant<bool, std::vector<int, std::allocator<int> > > find_journey(int, int, std::vector<int>, std::vector<int>)':
islands.cpp:10:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |  for(int i = 0; i < U.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...