Skip to content

Instantly share code, notes, and snippets.

@IvanIsCoding
IvanIsCoding / a.cpp
Last active October 21, 2023 09:07
Educational Dynamic Programming Contest - AtCoder
// Ivan Carvalho
// Problem A - Educational Dynamic Programming Contest - AtCoder
// Link : https://atcoder.jp/contests/dp
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int INF = 2*1e9;
int dp[MAXN],N,K,h[MAXN];