제출 #1077851

#제출 시각아이디문제언어결과실행 시간메모리
1077851pcc수천개의 섬 (IOI22_islands)C++17
5 / 100
20 ms5324 KiB
#include "islands.h" #include <variant> #include <vector> #include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define fs first #define sc second std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { if(N == 2){ vector<int> cnt[2]; for(int i = 0;i<M;i++){ int a = U[i],b = V[i]; cnt[a].push_back(i); } if(cnt[0].size()<2||cnt[1].size()<1)return false; int x = cnt[0][0],y = cnt[1][0],z = cnt[0][1]; return vector<int>({x,y,z,x,y,z}); } }

컴파일 시 표준 에러 (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:16:17: warning: unused variable 'b' [-Wunused-variable]
   16 |    int a = U[i],b = V[i];
      |                 ^
islands.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
#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...