# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
336136 | nafis_shifat | K blocks (IZhO14_blocks) | C++14 | 383 ms | 41356 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
using namespace std;
const int mxn=1e5+5;
const int inf=1e9;
int main() {
int n,K;
cin>>n>>K;
int a[n+1];
for(int i = 1; i <= n; i++) cin>>a[i];
int dp[n+1][K+1];
for(int i = 0; i <= n; i++) {
for(int j = 0; j <= K; j++) {
dp[i][j] = inf;
}
}
dp[0][0] = 0;
dp[1][1] = a[1];
for(int i = 2; i <= n; i++) {
dp[i][1] = max(dp[i-1][1],a[i]);
}
# | 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... |