- 博客(6)
- 资源 (2)
- 收藏
- 关注
原创 NYOJ 括号匹配(二)(区间dp)
描述 给你一个字符串,里面只包含"(",")","[","]"四种符号,请问你需要至少添加多少个括号才能使这些括号匹配起来。 如: []是匹配的 ([])[]是匹配的 ((]是不匹配的 ([)]是不匹配的输入 第一行输入一个正整数N,表示测试数据组数(N 每组测试数据都只有一行,是一个字符串S,S中只包含以上所说的
2016-12-31 17:02:53 406
原创 HDU 1533Going Home(费用流)
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4797 Accepted Submission(s): 2512Problem DescriptionOn a grid map ther
2016-12-31 11:12:21 328
原创 codeforces 742B - Arpa’s obvious problem and Mehrdad’s terrible solution
B. Arpa’s obvious problem and Mehrdad’s terrible solutiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTh
2016-12-14 20:59:39 427
原创 codeforces 735B - Urbanization
Local authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The
2016-12-04 10:53:58 422
原创 FOJ Problem 2218 Simple String Problem
Problem DescriptionRecently, you have found your interest in string theory. Here is an interesting question about strings.You are given a string S of length n consisting of the first k lowercase
2016-12-03 23:58:29 433
原创 蓝桥网 格子刷油漆
X国的一段古城墙的顶端可以看成 2*N个格子组成的矩形(如下图所示),现需要把这些格子刷上保护漆。你可以从任意一个格子刷起,刷完一格,可以移动到和它相邻的格子(对角相邻也算数),但不能移动到较远的格子(因为油漆未干不能踩!) 比如:a d b c e f 就是合格的刷漆顺序。 c e f d a b 是另一种合适的方案。 当已知 N 时,求总的方案数。当N较大
2016-12-01 13:04:39 370
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人