# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1084442 | _rain_ | Discharging (NOI20_discharging) | C++14 | 8 ms | 3164 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fixbug true
const ll INF = (ll)4e18+7;
const int maxn = 1e5;
ll a[maxn+2] ;
int n;
namespace subtask1{
bool check(){
return n <= 1500;
}
const int N = 1500;
ll f[N+2] , sum[N+2] = {};
void main_code(){
for (int i = 1; i <= n; ++i) f[i] = INF , sum[i] = INF;
for (int i = 1; i <= n; ++i){
ll mx = a[i];
for (int j = i; j >= 1; --j){
mx = max(mx , a[j]);
//ll v = f[j - 1] + sum[j - 1] * i - sum[j - 1] * (j + 1) + mx * i - mx * (j + 1);
f[i] = min(f[i] , f[j - 1] + mx * (n - j + 1));
}
}
cout << f[n];
return;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |