제출 #903306

#제출 시각아이디문제언어결과실행 시간메모리
903306Muhammad_Aneeq휴가 (IOI14_holiday)C++17
23 / 100
30 ms5496 KiB
#include <queue> #include <vector> #include <set> #include <iostream> #include "holiday.h" using namespace std; long long findMaxAttraction(int n, int start, int d, int attraction[]) { long long ans=0; if (start==0) { multiset<int>s; long long z=0; for (int j=0;j<min(n,d-1);j++) { s.insert(attraction[j]); z+=attraction[j]; while (j+s.size()>d) { z-=*begin(s); s.erase(begin(s)); } ans=max(ans,z); } return ans; } for (int i=0;i<n;i++) { } return 0; }

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

holiday.cpp: In function 'long long int findMaxAttraction(int, int, int, int*)':
holiday.cpp:18:21: warning: comparison of integer expressions of different signedness: 'std::multiset<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   18 |    while (j+s.size()>d)
      |           ~~~~~~~~~~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...