# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
416548 | 2021-06-02T15:14:56 Z | LouayFarah | 휴가 (IOI14_holiday) | C++14 | 18 ms | 8488 KB |
#include "bits/stdc++.h" #include "holiday.h" using namespace std; #define ll long long int vector<ll> dp; ll solve(ll i, int d, int n, int attraction[]) { if(d<=0) return 0; if(i==n) return 0; if(dp[d]!=-1) return dp[d]; return dp[d] = max(solve(i+1, d-1, n, attraction), solve(i+1, d-2, n, attraction) + attraction[i]); } long long int findMaxAttraction(int n, int start, int d, int attraction[]) { dp.assign(d+1, -1); ll res = solve(start, d, n, attraction); return dp[d]; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 588 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 8480 KB | Output is correct |
2 | Correct | 15 ms | 8480 KB | Output is correct |
3 | Correct | 15 ms | 8396 KB | Output is correct |
4 | Correct | 18 ms | 8488 KB | Output is correct |
5 | Incorrect | 14 ms | 5692 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 716 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 14 ms | 2596 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |