제출 #836344

#제출 시각아이디문제언어결과실행 시간메모리
836344ALeonidou수천개의 섬 (IOI22_islands)C++17
3.50 / 100
24 ms4440 KiB
#include "islands.h" #include <variant> #include <bits/stdc++.h> using namespace std; #define ll int #define sz(x) (ll)x.size() #define F first #define S second #define MID ((l+r)/2) #define pb push_back #define dbg(x) cout<<#x<<": "<<x<<endl; #define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl; #define dbg3(x,y,z) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl; #define dbg4(x,y,z,w) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<" "<<#w<<": "<<w<<endl; #define dbg5(x,y,z,w,q) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<" "<<#w<<": "<<w<<" "<<#q<<": "<<q<<endl; #define ins insert typedef vector <ll> vi; typedef pair <ll,ll> ii; typedef vector <ii> vii; #define MOD 1000002022 #define inf 1e9 variant<bool, vi> find_journey(int N, int M, vi U, vi V){ ll n = N, m = M; vi a,b; for (ll i =0; i<m; i++){ if (U[i] == 0) a.pb(i); else b.pb(i); } bool ok = (sz(a) >= 2 && sz(b) >= 1); return ok; ll c =0; for (ll i=0; i<m;i++){ if (U[i] == 0) c++; } return (c >= 2); }

컴파일 시 표준 에러 (stderr) 메시지

islands.cpp: In function 'std::variant<bool, std::vector<int, std::allocator<int> > > find_journey(int, int, vi, vi)':
islands.cpp:27:8: warning: unused variable 'n' [-Wunused-variable]
   27 |     ll n = N, m = M;
      |        ^
#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...