제출 #1247525

#제출 시각아이디문제언어결과실행 시간메모리
1247525m5588ohammed수천개의 섬 (IOI22_islands)C++20
1.75 / 100
19 ms7752 KiB
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
int n,m;
vector <int> v[200001];
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) {
	n=N,m=M;
	if(n==1){
		int a=0,b=0;
		for(int i=0;i<m;i++){
			if(U[i]==0) a++;
			else b++;
		}
		if(a>=2&&b>=2) return vector <int> ({0,1,0,1,0,0,1,0,1,0});
		else 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:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^
#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...