http://lightoj.com/volume_showproblem.php?problem=1341Aladdin and the Flying CarpetTime Limit:3000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSub...
分类:
其他好文 时间:
2015-10-30 20:23:17
阅读次数:
227
1100 - Again Array Queries PDF (English) Statistics Forum Time Limit: 3 second(s)Memory Limit: 32 MBGiven an array with n integers, and you are give.....
分类:
其他好文 时间:
2015-10-29 00:11:42
阅读次数:
243
1008 - Fibsieve`s Fantabulous BirthdayFibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was...
分类:
其他好文 时间:
2015-10-27 20:21:18
阅读次数:
168
题目链接:http://lightoj.com/volume_showproblem.php?problem=1100题意是给你n个数,q个询问,每次求出 a 到 b(从0开始)最小差值;直接暴力就能过:#include#include#include#include#includeusing na...
分类:
其他好文 时间:
2015-10-26 20:37:16
阅读次数:
193
题目链接:http://lightoj.com/volume_showproblem.php?problem=1148已知有n个人,并且每个人都知道除自己之外还有m个人与自己支持的队一样,让我们求至少有多少个人;就是很任性的过了;http://lightoj.com/volume_showprobl...
分类:
其他好文 时间:
2015-10-26 18:37:40
阅读次数:
172
题题目链接:http://lightoj.com/volume_showproblem.php?problem=1005题意就是在一个n*n的方格中放k个棋子,每一行每一列都不能有两个棋子,问有多少种方法,和8皇后问题很像, 但是8皇后问题可以用暴力搜索,但是本题n的取值范围较大,不能用搜索;在比赛...
分类:
其他好文 时间:
2015-10-26 12:10:34
阅读次数:
144
题意:给出N个节点的一棵树,每个节点有一个权值。有两种操作:1)0 i j, 问节点i->节点j的路上的总权值。2)1 i v,把节点i的权值改变成v。思路:权值在点上的树链剖分+线段树单点更新+线段树成段询问 1 #include 2 #include 3 #include 4 #i...
分类:
其他好文 时间:
2015-10-22 20:51:59
阅读次数:
185
题目:给出若干模板串和一个母串,求每个模板串在母串中出现的次数.思路:AC自动机+后缀链接(last数组)/** @author: Cwind*////#pragma comment(linker, "/STACK:102400000,102400000")#include #include #i....
分类:
其他好文 时间:
2015-10-14 00:10:49
阅读次数:
258
题意:就是数有一个字符串中有多少括号匹配:① ()算两种,② [ ] 算两种题解: 和 LightOj 那道题一样 F[ i ][ j ] = max(F[ i + 1][ j ], F[ i + 1][ k - 1] + F[ k ][ j ] + 2) {i + 1 #include #de.....
分类:
其他好文 时间:
2015-10-08 21:37:53
阅读次数:
211
1422 - Halloween CostumesPDF (English)StatisticsForumTime Limit:2 second(s)Memory Limit:32 MBGappu has a very busy weekend ahead of him. Because, next...
分类:
其他好文 时间:
2015-10-03 13:04:41
阅读次数:
254