- 博客(42)
- 收藏
- 关注
原创 HDU2476——String painter(区间dp)
DescriptionThere are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can change a s
2016-08-17 16:50:21 536
原创 HDU4283——You Are the One(区间dp)
Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall, so i
2016-08-17 15:25:16 398 1
原创 POJ1651——Multiplication Puzzle(区间dp)
最近刷区间dp,先写水题Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8604 Accepted: 5375DescriptionThe multiplication puzzle is play
2016-08-17 13:38:15 368
原创 POJ2955——Brackets(区间dp)
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6335 Accepted: 3388DescriptionWe give the following inductive definition of a “regular brack
2016-08-15 23:27:05 312
原创 HDU5745(2016多校第二场)——La Vie en rose(bitset,动态规划)
La Vie en roseTime Limit: 7000/3500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2329 Accepted Submission(s): 706Problem DescriptionProfessor Zh
2016-08-15 20:17:57 640
原创 HDU5833(2016CCPC网赛)——Zhu and 772002(异或方程组,素数分解)
Zhu and 772002Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 510 Accepted Submission(s): 170Problem DescriptionZhu and 77200
2016-08-15 10:21:51 902
原创 POJ2311——Cutting Game(sg函数)
Cutting GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3859 Accepted: 1438DescriptionUrej loves to play various types of dull games. He usually a
2016-08-13 22:40:46 591
原创 HDU5724(多校第一场)——Chess(sg函数,状态压缩)
ChessTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1838 Accepted Submission(s): 811Problem DescriptionAlice and Bob are pla
2016-08-13 22:37:26 381
原创 51NOD1042——1042 数字0-9的数量(数位dp)
给出一段区间a-b,统计这个区间内0-9出现的次数。比如 10-19,1出现11次(10,11,12,13,14,15,16,17,18,19,其中11包括2个1),其余数字各出现1次。Input两个数a,b(1 Output输出共10行,分别是0-9出现的次数Input示例10 19Output示例1111111
2016-08-13 16:30:02 537
原创 51NOD1007——整数分组(01背包)
将一堆正整数分为2组,要求2组的和相差最小。例如:1 2 3 4 5,将1 2 4分为1组,3 5分为1组,两组和相差1,是所有方案中相差最少的。Input第1行:一个数N,N为正整数的数量。第2 - N+1行,N个正整数。(N Output输出这个最小差Input示例512345Output示例1
2016-08-13 16:13:15 495
原创 51NOD1092—— 回文字符串(区间dp)
回文串是指aba、abba、cccbccc、aaaa这种左右对称的字符串。每个字符串都可以通过向中间添加一些字符,使之变为回文字符串。例如:abbc 添加2个字符可以变为 acbbca,也可以添加3个变为 abbcbba。方案1只需要添加2个字符,是所有方案中添加字符数量最少的。Input输入一个字符串Str,Str的长度 Output输出最少添加多
2016-08-13 16:03:27 440
原创 POJ2975——Nim(经典nim变种)
NimTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5556 Accepted: 2604DescriptionNim is a 2-player game featuring several piles of stones. Players a
2016-08-13 13:29:54 489
原创 博弈论专题——推理与动态规划相关博弈之POJ2068 POJ3688动态规划)
NimTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1649 Accepted: 931DescriptionLet's play a traditional game Nim. You and I are seated across a table
2016-08-12 23:36:17 1045
原创 博弈论专题——推理与动态规划相关博弈之POJ2348
Euclid's GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8827 Accepted: 3605DescriptionTwo players, Stan and Ollie, play, starting with two natura
2016-08-12 23:16:48 2013 2
原创 博弈论专题——推理与动态规划相关博弈之POJ2484 POJ1740(模仿游戏)
本专题题目均来自挑战程序设计竞赛例题和练习A Funny GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5198 Accepted: 3244DescriptionAlice and Bob decide to play a fu
2016-08-12 23:01:36 582
原创 HDU5823(2016多校第八场)——color II (状压dp,独立集)
New~ 欢迎参加2016多校联合训练的同学们~ color IITime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 512 Accepted Submission(s): 205Probl
2016-08-12 16:33:04 1477
原创 Codeforces Round #367 (Div. 2) D——Vasiliy's Multiset(异或字典树)
D. Vasiliy's Multisettime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAuthor has gone out of the stories ab
2016-08-12 13:45:33 877
原创 HDU5831(2016多校第八场)———Rikka with Parenthesis II(水题)
Rikka with Parenthesis IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 16 Accepted Submission(s): 16Problem DescriptionAs w
2016-08-11 17:50:38 601
原创 HDU5812(2016多校第七场)——Distance(数论,枚举)
DistanceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 304 Accepted Submission(s): 111Problem DescriptionIn number theory,
2016-08-10 14:26:09 690
原创 HDU5816(2016多校第七场)——Hearthstone(暴力枚举,状态压缩)
HearthstoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 488 Accepted Submission(s): 206Problem DescriptionHearthstone is a
2016-08-10 13:32:08 894
原创 HDU5810(2016多校第七场)——Balls and Boxes(组合数学,概率)
Balls and BoxesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 29 Accepted Submission(s): 21Problem DescriptionMr. Chopsticks
2016-08-09 17:51:38 587
原创 HDU5818(多校第七场)——Joint Stacks(优先队列,左偏树)
Joint StacksTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 81 Accepted Submission(s): 29Problem DescriptionA stack is a data
2016-08-09 17:45:54 564
原创 HDU5813(多校第七场)——Elegant Construction(模拟构造)
Elegant ConstructionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 42 Accepted Submission(s): 21Special JudgeProblem Description
2016-08-09 17:39:19 635
原创 51NOD中的矩阵取数问题(1083,1084,1411)——动态规划,插头dp
唉,dp还是不行,多加努力。1083 矩阵取数问题基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题 收藏 关注一个N*N矩阵中有不同的正整数,经过这个格子,就能获得相应价值的奖励,从左上走到右下,只能向下向右走,求能够获得的最大价值。例如:3 * 3的方格。1 3 3
2016-08-08 15:37:50 1401
原创 HDU5781(2016多校第五场)——ATM Mechine(动态规划)
ATM MechineTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1021 Accepted Submission(s): 515Problem DescriptionAlice is going
2016-08-08 10:08:59 380
原创 HDU5792(2016多校第五场)——World is Exploding(树状数组,离散化)
World is ExplodingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 901 Accepted Submission(s): 423Problem DescriptionGiven a s
2016-08-07 16:57:32 401
原创 HDU5791(2016多校第五场)——Two(动态规划)
TwoTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1543 Accepted Submission(s): 680Problem DescriptionAlice gets two sequence
2016-08-07 16:52:31 315
原创 HDU5783(2016多校第五场)——Divide the Sequence(水水水)
New~ 欢迎参加2016多校联合训练的同学们~ Divide the SequenceTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 962 Accepted Submission(s): 471
2016-08-07 16:48:03 330
原创 Gym 100947C——Rotate It !!(水题水题)
Rotate It !!time limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputDzy and Fox have a sequence A consisting of N n
2016-08-06 22:55:19 481
原创 POJ1741——Tree(树上分治,树的重心)
TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 17804 Accepted: 5818DescriptionGive a tree with n vertices,each edge has a length(positive integer
2016-08-06 22:50:53 390
原创 CodeForces 615E——Hexagons(二分,模拟)
E. Hexagonstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAyrat is looking for the perfect code. He decide
2016-08-06 22:47:12 349
原创 SPOJ——QTREE2 - Query on a tree II(树链剖分或者倍增法)
DescriptionYou are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. Each edge has an integer value assigned to it, representing its length.W
2016-08-06 22:37:16 970
原创 HDU5723(2016多校第一场)——Abandoned country(最小生成树+dfs)
DescriptionAn abandoned country has n(n≤100000) villages which are numbered from 1 to n. Since abandoned for a long time, the roads need to be re-built. There are m(m≤1000000) roads to be re
2016-08-06 22:21:58 480
原创 SPOJ375——Query on a tree(树链剖分模板详解以及入门)
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti : cha
2016-08-05 10:42:56 2689 1
原创 POJ1135——Domino Effect(最短路)
Domino EffectTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10676Accepted: 2648DescriptionDid you know that you can use domino bones for other thing
2016-08-04 16:37:36 605
原创 POJ1112——Team Them Up!(动态规划,二分图判定)
Team Them Up!Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 7454Accepted: 2011Special JudgeDescriptionYour task is to divide a number of perso
2016-08-04 16:20:34 1165
原创 CodeForces 337D——Book of Evil(数据结构)
D. Book of Eviltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPaladin Manao caught the trail of the ancie
2016-08-03 20:39:57 1039 1
原创 10635 - Prince and Princess(最长公共子序列优化,动态规划)
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1576题意:就是求两个序列的最长公共子序列思路:因为数据量是10^5的,一般的n^2的算法会TML。所以得优化,就是把a中出现的数,在b中出现过的对应的位置记录下来,然后用nlgn的
2016-08-03 20:29:55 544
原创 POJ2411——Mondriaan's Dream(轮廓线dp入门)
Mondriaan's DreamTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 15207Accepted: 8771DescriptionSquares and rectangles fascinated the famous Dutch pai
2016-08-03 20:12:01 1000
原创 POJ3311——Hie with the Pie(floyd,状态压缩dp,旅行商)
Hie with the PieTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6506 Accepted: 3514DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas t
2016-08-02 21:46:00 453
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人