# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
363315 | nicolaalexandra | K blocks (IZhO14_blocks) | C++14 | 507 ms | 87388 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 DIM 100010
#define DIMK 110
#define INF 2000000000000000000LL
using namespace std;
long long dp[DIMK][DIM],aint[DIM*4],v[DIM];
int rmq[20][DIM],p[DIM];
deque <int> d;
int n,k,i,j,t;
int get_min (int x, int y){
int nr = p[y-x+1];
return min (rmq[nr][x],rmq[nr][y-(1<<nr)+1]);
}
int main (){
//ifstream cin ("date.in");
//ofstream cout ("date.out");
cin>>n>>k;
for (i=1;i<=k;i++)
for (j=1;j<=n;j++)
dp[i][j] = INF;
for (i=1;i<=n;i++){
cin>>v[i];
dp[1][i] = max (dp[1][i-1],v[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... |