- 博客(5)
- 收藏
- 关注
原创 Xiangtan Invitation Contest 2017 - C Similar Subsequence(高斯消元)
IntersectionBobo has two sets of integers A={a1,a2,…,an} and B={b1,b2,…,bn}. He says that x∈span(A) (or span(B)) if and only if there exists a subset of A (or B) whose exclusive-or sum equals
2017-05-19 16:16:05 499 2
原创 Xiangtan Invitation Contest 2017 - J Similar Subsequence(DP)
For given sequence A = (a1, a2, . . . , an), a sequence S = (s1, s2, . . . , sn) has shape A if and only if:• si = min{si, si+1, . . . , sn} for all ai = 0;• si = max{si, si+1, . . . , sn} for all a
2017-05-16 21:39:42 590
原创 CCNU校赛2017 - C 奇数串
Description给出一个仅包含小写字母的字符串,求其所有子串,满足子串中的所有字母出现奇数次。Input首先输入一个整数 TTT,表示TTT 组数据。接下来 TTT 行,每行表示一个非空字符串。 约定:TTT 不超过 20; 字符串长度不超过100000; 至多只有十组数据的字符串长度超过10000。 Output对每组用例,输出 CASE #i:
2017-05-10 20:01:36 542
原创 Codeforces Round #411 (Div. 1) D. Expected diameter of a tree(树的直径)
Pasha is a good student and one of MoJaK's best friends. He always have a problem to think about. Today they had a talk about the following problem.We have a forest (acyclic undirected graph) with
2017-05-09 22:37:35 778
原创 CCNU校赛2017 - F 康康撩妹(斜率DP)
分析:大概就是f[i][j] = min (f[k][j-1] + w[k+1][i])这种形式的DP,我们把w函数拆开可以得到一个斜率为-dis[i][n]的等式,随着i的增大斜率也在不断增大,所以我们维护一个下凸的决策队列,这样能把转移复杂度优化到O (1).题目链接:https://acm.whu.edu.cn:8443/problem/663#include #define IN
2017-05-08 23:08:21 557
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人