poj 1218 THE DRUNK JAILER【水题】】的更多相关文章

THE DRUNK JAILER Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 25124   Accepted: 15767 Description A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked…
一.Description A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked. One night, the jailer gets bored and decides to play a game. For round 1 of the game, he takes a d…
THE DRUNK JAILER Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23358   Accepted: 14720 Description A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked…
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/sr19930829/article/details/37727417 THE DRUNK JAILER Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23246   Accepted: 14641 Description A certain prison contains a long hall of n cells, e…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2188 题目大意:n为5-100之间的一个数,代表有多少间牢房,刚开始所有房间打开,第一轮2的倍数的房间(打开的关上,关上的打开),第二轮3的倍数,第四轮4的倍数......n轮,最后有几间牢房打开的 . 解题思路:开灯问题,跟HDU 2053差不多,只要牢房编号是完全平方数,那囚犯就可以逃出去.这里有解释:http://www.cnblogs.com/fu3638/p/7507239.html sq…
题目:http://poj.org/problem?id=3080 水题,暴搜 #include <iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<stack> #include<queue> #include<iomanip> #include<cmath> #include<map> #include…
题目链接:http://poj.org/problem?id=3984 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线. Input 一个5 × 5的二维数组,表示一个迷宫.数据保证有…
DNA Sorting Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 80832   Accepted: 32533 Description One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instanc…
Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 126087   Accepted: 55836 Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has deci…
题意:给定一个金字塔,第 i 行有 i 个数,从最上面走下来,只能相邻的层数,问你最大的和. 析:真是水题,学过DP的都会,就不说了. 代码如下: #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <set> #include <…