经典问题
文章平均质量分 79
_OTTFF
这个作者很懒,什么都没留下…
展开
-
UVA_10271_Chopsticks
10271 - ChopsticksTime limit: 3.000 secondsIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He usesa set of three chopsticks { one pair, plus an原创 2015-08-24 16:28:50 · 388 阅读 · 0 评论 -
POJ_2392_SpaceElevator(多重背包)
Space ElevatorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10883 Accepted: 5185DescriptionThe cows are going to space! They plan to achieve orbit by原创 2016-07-31 17:20:27 · 638 阅读 · 0 评论 -
POJ_2486_AppleTree(树状DP&&01背包)
Apple TreeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9584 Accepted: 3192DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX t原创 2016-07-31 16:47:32 · 836 阅读 · 0 评论 -
HDU_3535_AreYouBusy(多种背包组合)
AreYouBusyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3887 Accepted Submission(s): 1536Problem DescriptionHappy New Term!As原创 2016-07-31 15:56:19 · 759 阅读 · 0 评论 -
UVA_10189_Minesweeper
10189 - MinesweeperTime limit: 3.000 secondsHave you ever played Minesweeper? It's a cute little game which comes within a certain OperatingSystem which name we can't really remember. Well, th原创 2015-09-30 11:19:26 · 318 阅读 · 0 评论 -
UVA_10970_BigChocolate
10970 - Big ChocolateTime limit: 3.000 secondsMohammad has recently visited Switzerland. As heloves his friends very much, he decided to buy somechocolate for them, but as this ne chocolate原创 2015-09-02 21:07:20 · 859 阅读 · 0 评论 -
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 · 362 阅读 · 0 评论 -
POJ_2676_Sudoku
数独,当年一家人都很疯狂的玩如今用电脑dfs非常容易的就解决了。判断在同一大格里可以填有点麻烦。题目每组输入其实是9个整数,所以……另外就是题目要求对于有多个解的题目,输出一个可行解。#include #include using namespace std;int ss[9]; //输入这里也卡了一下int s[9][9];原创 2015-07-23 18:36:23 · 334 阅读 · 0 评论 -
HDU_2553_N皇后问题
经典问题。但是方案却不唯一,记得很早的时候写过n个循环嵌套的版本。现在想想蠢死了。只有八皇后是否在同一直线斜线上判断方法也有多种。首先一行一行(或者一列一列)填皇后这个应该是没的说的。判断斜线是个要点法1就是打一个棋盘然后每填上一个皇后就把皇后的攻击范围全部标记。回溯的时候再把皇后的攻击范围全部改回去。 判断皇后能不能在那个格子很快。但是这个填改的过程应该原创 2015-07-23 17:03:42 · 378 阅读 · 0 评论 -
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 阅读 · 0 评论 -
HDU_5781_ATM_Mechine(概率期望dp)
ATM MechineTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 512 Accepted Submission(s): 221Problem DescriptionAlice is going to ta原创 2016-08-03 12:00:04 · 399 阅读 · 0 评论