给出一个长度为n的已经匹配的括号字符串,然后有Q次操作,每次操作会翻转一个括号,让你翻转最左边的某个括号使得整个字符串再次匹配。...
分类:
其他好文 时间:
2015-08-18 01:20:27
阅读次数:
187
1601: War
Time Limit: 1 Sec Memory Limit:
128 MB
Submit: 202 Solved: 58
[Submit][Status][Web
Board]
Description
AME decided to destroy CH’s country. In CH’ country, There are N villages, ...
分类:
其他好文 时间:
2015-08-14 22:46:48
阅读次数:
159
传送门DescriptionA kingdom has n cities numbered 1 to n, and some bidirectional roads connecting cities. The capital is always city 1.After a war, all th...
分类:
其他好文 时间:
2015-08-14 21:01:19
阅读次数:
123
传送门Time Limit:5000MSMemory Limit:65536KB64bit IO Format:%lld & %lluDescription在一个奇怪的村子中,很多人的名字都很长,比如aaaaa, bbb and abababab。名字这么长,叫全名显然起来很不方便。所以村民之间一般...
分类:
其他好文 时间:
2015-08-14 18:48:28
阅读次数:
142
CSU 1204 Rectangles (二分)...
分类:
其他好文 时间:
2015-08-14 17:06:05
阅读次数:
117
#include #include #include #include #include #include #include #define lson l,mid,os2[j]&&maxxans) ans=dp[j]; } printf("%d\n",ans); }...
分类:
其他好文 时间:
2015-08-09 23:56:25
阅读次数:
186
CSU - 1542
Flipping Parentheses
Time Limit: 5000MS
Memory Limit: 262144KB
64bit IO Format: %lld & %llu
Submit Status
Description
Input...
分类:
其他好文 时间:
2015-08-09 22:37:16
阅读次数:
212
题目链接:
csu 1116
题意:
有一幅双向图连接N个城市(标号1~n,1表示首都) 每个城市有一个价值W.
地震摧毁了所有道路,现给出可修复的m条道路并给出修复每条道路所需的费用
问在总费用不超过k的情况下,使得 与 首都连通的所有城市 的价值和 最大
解题思路:
点的数量不超过16 ,2^16次方枚举所有城市是否在连通的集合类
...
分类:
其他好文 时间:
2015-08-09 22:35:54
阅读次数:
150
#include #include #include #include #include #include #include #define lson l,m,rt> 1; build(lson); build(rson); up(rt);}int A,B;void update(...
分类:
其他好文 时间:
2015-08-08 22:46:12
阅读次数:
167
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1659题意是找一个图的中心,图的中心定义是某一个点到其他点的最大距离最小,如果有多个排序输出.注意这里大到其他点的距离是找一个最短的距离,那么就转化成了最短路的问题,求出每个点与其它点的最大距离,保存...
分类:
其他好文 时间:
2015-08-04 15:19:57
阅读次数:
91