제출 #134636

#제출 시각아이디문제언어결과실행 시간메모리
134636ckodserRoller Coaster Railroad (IOI16_railroad)C++14
0 / 100
135 ms15728 KiB
#include "railroad.h" #include<bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define pii pair<ll,ll> #define F first #define S second #define ld long double using namespace :: std; const ll maxn=1e5+500; const ll inf=1e9+900; long long plan_roller_coaster(vector<int> s,vector<int> t) { int n = (int) s.size(); vector<pii> vec; for(auto v:s){ vec.pb(mp(v,1)); } for(auto v:t){ vec.pb(mp(v,0)); } sort(vec.begin(),vec.end()); reverse(vec.begin(),vec.end()); ll sum=0; for(auto e:vec){ if(e.S==0){ sum++; }else{ sum--; } if(sum>1)return 1; } return 0; }

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

railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:18:9: warning: unused variable 'n' [-Wunused-variable]
     int n = (int) s.size();
         ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...