原题链接 神仙\(DP\)啊... 题解请移步隔壁大佬的博客\(QAQ\) #include<cstdio> using namespace std; const int N = 2e5 + 10; int L[N], R[N], q[N], f[N]; inline int re() { int x = 0; char c = getchar(); bool p = 0; for (; c < '0' || c > '9'; c = getchar()) p |= c == '-…
题目链接:传送门 题目: 题目描述 Farmer John has decided to assemble a panoramic photo of a lineup of his N cows ( <= N <= ,), which, ..N. Accordingly, he snapped M ( <= M <= ,) photos, each covering a contiguous range of cows: photo i contains cows a_i thro…