- 博客(56)
- 收藏
- 关注
原创 2015_07_31_正式训练的第一个月份
第一次体验一年不回家的感觉。但是集训带来的提高却让我感到充实。我是一只大菜鸟,接下来的日子还要更快的成长。7.30用老队员的账号去打了一场HDU的比赛1个小时时间出了别人五分钟的题目(而且这两个题目还是主办方手软送的)之后4个小时一题未出,有一个题目只差一点452名,没有错这里就是开始的地方。7月份20号开始a了60个菜鸟题目。接下来还要更多。为自己加油吧
2015-07-31 22:11:30 271
原创 HDU_5327_Olympiad
OlympiadTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 428 Accepted Submission(s): 308Problem DescriptionYou are one of the co
2015-07-31 21:58:05 413
原创 ZOJ_1093_MonkeyAndBanana(完全背包)
Monkey and BananaTime Limit: 2 Seconds Memory Limit: 65536 KBA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a buil
2015-07-31 18:10:01 359
原创 POJ_1458_CommonSubsequence
Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42953 Accepted: 17377DescriptionA subsequence of a given sequence is the given seque
2015-07-31 18:02:52 317
原创 HDU_1087_SuperJumping!Jumping!Jumping!
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27448 Accepted Submission(s): 12180Problem Descri
2015-07-31 17:59:51 336
原创 SCU_1114_数字三角
数字三角Time Limit:0MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice SCU 1114Description下图是个数字三角,请编写一个程序计算从顶部至底部某处一条路径,使得该路径所经过的数字总和最大。73 88 1 0
2015-07-31 17:57:42 670
原创 CSU_1640_机智的刷题方式(完全背包)
1640: 机智的刷题方式Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 228 Solved: 72[Submit][Status][Web Board]Description小B想参加中南大学2015年大学生程序设计竞赛暑期集训,相信猛刷自然强的小B表示做题进集训队完全不是事~当然刷题还是有一定技巧的,考虑到每种题
2015-07-31 17:25:45 562
原创 FZU_1208_最大k乘积问题
Problem 1208 最大k乘积问题Accept: 356 Submit: 828Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description设I是一个n位十进制整数。如果将I划分为k段,则可得到k个整数。这k个整数的乘积称为I的一个k乘积。试设计一个算法,对于给定的I和k,求出I
2015-07-31 17:20:17 2094 3
原创 POJ_3414_Pots
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11767 Accepted: 4981 Special JudgeDescriptionYou are given two pots, having the volume of A an
2015-07-31 17:07:20 330
原创 POJ_2709_Painter
PainterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3725 Accepted: 2252DescriptionThe local toy store sells small fingerpainting kits with between
2015-07-31 17:03:53 877
原创 CSU_1548_DesignRoad
Design roadTime Limit: 2 Sec Memory Limit: 256 MBSubmit: 306 Solved: 153[Submit][Status][Web Board]DescriptionYou need to design road from (0, 0) to (x, y) in plane with the lowest
2015-07-31 16:56:25 333
原创 CF_405B_DominoEffect
模拟的问题,不用想的太复杂,从左往右把序列刷过去就好了判断最后立着的块在左边有左倒右边有右倒的情况比较麻烦
2015-07-31 16:50:19 355
原创 CSU_1469_Handles
1469: HandlesTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 230 Solved: 51[Submit][Status][Web Board]Description There are N·M handles on the ground. Every handle can be in one of
2015-07-31 09:01:20 287
原创 POJ_1068_Parencodings
ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22987 Accepted: 13469DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses
2015-07-30 10:52:33 268
原创 POJ_2260_ErrorCorrection
Error CorrectionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5920 Accepted: 3823DescriptionA boolean matrix has the parity property when each row a
2015-07-30 10:47:18 335
原创 HDU_1009_FatMouse'Trade
FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 53800 Accepted Submission(s): 17996Problem DescriptionFatMouse
2015-07-30 10:41:43 381
原创 HDU_1051_WoodenSticks
Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14866 Accepted Submission(s): 6098Problem DescriptionThere is a
2015-07-30 10:37:07 251
原创 HDU_1789_DoingHomeworkAgain
Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8675 Accepted Submission(s): 5115Problem DescriptionIgnatiu
2015-07-29 23:25:18 687
原创 HDU_2289_Cup
CupTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5443 Accepted Submission(s): 1735Problem DescriptionThe WHU ACM Team has a b
2015-07-29 23:20:06 421
原创 HDU_2298_Toxophily
Toxophily Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1480 Accepted Submission(s): 772Problem DescriptionThe recreation cen
2015-07-29 23:14:17 368
原创 CF_327C_MagicFive
Magic Fivetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a long plate s containing n digits. Iahub wants to
2015-07-29 22:40:28 353
原创 CF_448E_Divisors
Divisorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion isn't just friendly, he also is a rigorous
2015-07-29 22:32:28 502
原创 CF_484B_MaximumValue
Maximum Valuetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence a consisting ofn integers. Find
2015-07-29 22:27:06 438
原创 CF_288B_PoloThePenguinAndHouses
Polo the Penguin and Houses time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle penguin Polo loves his home villa
2015-07-29 22:22:12 441
原创 POJ_2362_Square
SquareTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 21782 Accepted: 7606DescriptionGiven a set of sticks of various lengths, is it possible to join th
2015-07-29 08:57:51 311
原创 POJ_1426_FindTheMultiple
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21478 Accepted: 8797 Special JudgeDescriptionGiven a positive integer n, write a pr
2015-07-29 08:44:26 343
原创 CF_540C_IceCave
这个题目本身从任务的角度是一个dfs的题目。因为只需要判断能否最后到达指定位置。与一般的迷宫不同的一点事这个的最后到达的位置要求为‘X’而不能是‘.’如果是‘.’则要再到达一次。这个问题本事判定并不复杂。问题在于这个问题给出的迷宫很大500*500在写dfs时应该注意判过的点在回溯时并不需要改回‘.’因为回退前的路径都是错误的(正确就弹出了),不需要再从别的路径到达再判
2015-07-26 17:13:44 613
原创 HDU_1010_TempterOfTheBone
魔鬼骨头……迷宫问题这个题目因为其中一个return查了好久,而恰恰思路正确测试数据可以过……&这个题目需要剪枝,因为实在减掉了太多。题目中说t时刻门会开,这并不是一个bfs的问题,而是dfs因为bfs只会求出最短的时间剪枝101010010101101010010101如上从1的位置出发经过奇数时间必定达到0
2015-07-25 17:20:48 309
原创 HDU_4004_TheFrog'sGames
二分搜索,在二分搜索调用的函数上花了很多时间#include #include #include #include using namespace std;const int M=500005;int st[M];bool isj(int mi,int n,int m) //能不能跳过去{ int p=0,i=1; int co=0;
2015-07-25 17:06:53 317
原创 HDU_1501_Zipper
Zipper这个名字很形象……s1 s2两个序列不改变顺序交替构成s3dfs的题目因为深度是固定的,而找到结果就可以弹出。不过我用bfs居然过了……以下为bfs。#include #include #include #include using namespace std;const int M=205;char s1[M],s2[M],s3[2*M];int
2015-07-25 17:03:41 375
原创 POJ_3278_CatchThatCow
就是把输入的数字1通过+1 -1 x2三种方式变成输入数字2bfs即可#include #include #include using namespace std;const int M=100005;int isu[M];queuere;void clearu() //清空{ for(int i=0;i<M;i++) {
2015-07-25 16:56:43 242
原创 HDU_1548_AStrangeLift
bfs即可每个楼梯有两种情况#include #include #include #include using namespace std;const int M=205;int fl[M];int isu[M];queuere;void clearu() //清空{ for(int i=0;i<M;i++) //这里的范
2015-07-25 16:53:45 261
原创 POJ_1562_ZOJ_1709_OilDeposits
油田,经典的bfs调用bfs次数就是油田的片数感觉还能优化貌似调用过的油田直接改回非油田就好了不用再开数组标记了#include #include #include using namespace std;const int M=105;char ti[M][M];int isu[M][M];int dx[8]={-1,0,1,1,1,0,-1,-1};int
2015-07-25 09:07:57 368
原创 POJ_3126_PrimePath
bfs这个题目就麻烦在数字是按位变化的,所以要把数字拆开……#include #include #include using namespace std;const int M=10005;int pri[M];int prim[11][10][10][10]; //拆开的素数int isu[M];queuere;void bfs(int n,int
2015-07-25 08:59:35 309
原创 POJ_1915_KnightMoves
bfs就是跟马的运动方式一样么……#include #include #include using namespace std;const int M=305;int isu[M][M];int dx[8]={-2,-1,1,2,2,1,-1,-2};int dy[8]={-1,-2,-2,-1,1,2,2,1};queuere;int tot;void b
2015-07-25 08:55:28 411
原创 HDU_1312_ZOJ_2165_RedAndBlack
第一道bfs 裸题#include #include #include using namespace std;const int M=22;char ti[M][M];int isu[M][M]; //记录是否访问过int dx[4]={0,0,-1,1}; //用这样的方式来移动int dy[4]={1,-1,0,
2015-07-25 08:49:22 332
原创 ZOJ_1649_HDU_1242_Rescue
这个题目由于守卫的存在时间不再是根据bfs的层数增加的。这个问题可以用优先队列,以时间为优先级进行。以后补充优先队列的代码。个人又开了一个队列单独记录守卫的格子。问题就在于顺序1.遍历到A。A的路入队,守卫入队2。2.遍历A的路。A的路的路入队,守卫入队2。3此时“第一次”入队2的守卫入队。(麻烦就麻烦在这个地方计数很烦,详见代码)4………….以后还是优
2015-07-24 17:26:57 323
原创 ZOJ_1008_GnomeTetravex
这个问题在输出上坑了一下人。题目中Print a blank line between each game case.between……总体感觉没什么特别的,据说不剪枝会超时。剪枝做的就是把相同的卡片 拿出来。#include #include using namespace std;const int M=6;int s[M*M][5]; //记录输入
2015-07-24 09:43:17 417
原创 POJ_2676_Sudoku
数独,当年一家人都很疯狂的玩如今用电脑dfs非常容易的就解决了。判断在同一大格里可以填有点麻烦。题目每组输入其实是9个整数,所以……另外就是题目要求对于有多个解的题目,输出一个可行解。#include #include using namespace std;int ss[9]; //输入这里也卡了一下int s[9][9];
2015-07-23 18:36:23 335
原创 HDU_2553_N皇后问题
经典问题。但是方案却不唯一,记得很早的时候写过n个循环嵌套的版本。现在想想蠢死了。只有八皇后是否在同一直线斜线上判断方法也有多种。首先一行一行(或者一列一列)填皇后这个应该是没的说的。判断斜线是个要点法1就是打一个棋盘然后每填上一个皇后就把皇后的攻击范围全部标记。回溯的时候再把皇后的攻击范围全部改回去。 判断皇后能不能在那个格子很快。但是这个填改的过程应该
2015-07-23 17:03:42 379
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人