제출 #1058198

#제출 시각아이디문제언어결과실행 시간메모리
1058198tolbi수천개의 섬 (IOI22_islands)C++17
6.75 / 100
17 ms4568 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); else don.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]}; } return false; }

컴파일 시 표준 에러 (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...