Submission #416557

#TimeUsernameProblemLanguageResultExecution timeMemory
416557LouayFarahHoliday (IOI14_holiday)C++14
0 / 100
5060 ms6820 KiB
#include "bits/stdc++.h" #include "holiday.h" using namespace std; #define ll long long int ll solve(ll i, int day, int n, int attraction[]) { if(day<=0) return 0; if(i==n) return 0; return max(solve(i+1, day-1, n, attraction), solve(i+1, day-2, n, attraction) + attraction[i]); } long long int findMaxAttraction(int n, int start, int d, int attraction[]) { return solve(0, d, n, attraction); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...