제출 #413165

#제출 시각아이디문제언어결과실행 시간메모리
413165Ahmadsm2005모임들 (IOI18_meetings)C++14
0 / 100
1 ms308 KiB
#include "meetings.h" //#include "grader.cpp" #include<bits/stdc++.h> using namespace std; vector<long long>LL,RR; vector<int>h; long long ACC[5001][5001],DP[5001][5001]; long long query(int L,int R){ long long miner=(int)2e18; for(int i=L;i<=R;i++){ miner=min(miner,DP[L][i]+DP[i][R]); } return miner; } vector<long long>minimum_costs(vector<int>H,vector<int>L,vector<int>R){ h=H; vector<long long>ANS; for(int i=0;i<H.size();i++){ int maxer=0; for(int l=0;l<H.size();l++) maxer=max(maxer,H[l]),ACC[i][l]=maxer; } for(int i=0;i<H.size();i++){ long long CUR=0; for(int l=0;l<H.size();l++) CUR+=ACC[i][l]; for(int l=H.size();l>=0;l--) DP[l][i]=CUR,CUR-=ACC[l][i]; } for(int i=0;i<L.size();i++) ANS.push_back(query(L[i],R[i])); return ANS; }

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

meetings.cpp: In function 'std::vector<long long int> minimum_costs(std::vector<int>, std::vector<int>, std::vector<int>)':
meetings.cpp:18:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 | for(int i=0;i<H.size();i++){
      |             ~^~~~~~~~~
meetings.cpp:20:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 | for(int l=0;l<H.size();l++)
      |             ~^~~~~~~~~
meetings.cpp:23:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 | for(int i=0;i<H.size();i++){
      |             ~^~~~~~~~~
meetings.cpp:25:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 | for(int l=0;l<H.size();l++)
      |             ~^~~~~~~~~
meetings.cpp:30:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 | for(int i=0;i<L.size();i++)
      |             ~^~~~~~~~~
#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...