Submission #1058178

#TimeUsernameProblemLanguageResultExecution timeMemory
1058178tolbiThousands Islands (IOI22_islands)C++17
0 / 100
1 ms348 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { //N=2 vector<int> git; vector<int> don; for (int i = 0; i < U.size(); i++){ if (U[i]==0) git.push_back(i); } if (git.size()==2 && don.size()==1){ return vector<int>{git[0],don[0],git[1],git[0],don[0],git[1]}; } if (git.size()<2 || don.size()<2) return false; return vector<int>{git[0],don[0],git[1],don[1],don[0],git[0],don[1],git[1]}; }

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:9:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  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...