제출 #115422

#제출 시각아이디문제언어결과실행 시간메모리
115422dsjong모임들 (IOI18_meetings)C++14
4 / 100
5584 ms1208 KiB
#include "meetings.h" #include <bits/stdc++.h> using namespace std; vector<long long> minimum_costs(vector<int> H, vector<int> L, vector<int> R){ vector<long long>ret; for(int q=0;q<L.size();q++){ int l=L[q],r=R[q]; long long res=LONG_LONG_MAX; for(int i=l;i<=r;i++){ long long ans=0,maxi=0; for(int j=i;j>=l;j--){ maxi=max((long long)H[j],maxi); ans+=maxi; } maxi=0; for(int j=i;j<=r;j++){ maxi=max((long long)H[j],maxi); ans+=maxi; } res=min(res,ans-H[i]); } ret.push_back(res); } return ret; }

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

meetings.cpp: In function 'std::vector<long long int> minimum_costs(std::vector<int>, std::vector<int>, std::vector<int>)':
meetings.cpp:6:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int q=0;q<L.size();q++){
              ~^~~~~~~~~
#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...