摘要:
Codeforces Round #586 (Div. 1 + Div. 2) D. Alex and Julian Description Boy Dima gave Julian a birthday present - set BB consisting of positive integer 阅读全文
摘要:
Find the answer Description Given a sequence of n integers called W and an integer m. For each i (1 <= i <= n), you can choose some elements Wk (1 <= 阅读全文
摘要:
Kadane Algorithm 求一个数组里连续子序列的和最大。 A. Flipping Game Description Iahub got bored, so he invented a game to be played on paper. He writes n integers a1, 阅读全文
摘要:
A. Boredom A. Boredom Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a 阅读全文
摘要:
D2. RGB Substring (hard version) Description The only difference between easy and hard versions is the size of the input. You are given a string ss co 阅读全文
摘要:
题目链接 A:Equivalent Prefixes 给你两个长度为n的序列a、b,求一个最大k值使,i-k 中任意一个区间的最小值下标都相同 我们用单调栈处理每个元素作为最小值的左端点。 我们把下标放进栈中,比较的时候比较具体的值,维护一个值逐渐变大的单调栈。 若当前栈为空,则说明没有比当前值更小 阅读全文
摘要:
D2. Submarine in the Rybinsk Sea (hard edition) Description This problem differs from the previous one only in the absence of the constraint on the eq 阅读全文
摘要:
先抄个模板 EK: 1 const int MAXN = 430; 2 const int MAX_INT = (1 << 30); 3 4 struct Edge{ 5 int v, nxt, w; 6 }; 7 8 struct Node{ 9 int v, id; 10 }; 11 12 in 阅读全文