제출 #1061893

#제출 시각아이디문제언어결과실행 시간메모리
1061893sleepntsheep휴가 (IOI14_holiday)C++17
23 / 100
17 ms1152 KiB
#include "holiday.h" long long int findMaxAttraction(int n, int start, int d, int attr[]) { int c[101] = { 0 }, z = 0; for (int i = 0; i < n; ++i) { ++c[attr[i]]; int lef = d - i, y = 0; for (int j = 100; lef && j >= 0; --j) { int u = c[j] < lef ? c[j] : lef; lef -= u; y += u * j; } if (y > z) z = y; } return z; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...