THE DRUNK JAILER】的更多相关文章

THE DRUNK JAILER Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 24918   Accepted: 15632 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…
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…
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…
Problem 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 drink o…
一.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…
这是一道很简单的题目,题目大概意思说下:就是有n个监狱(编号从1到n),第一次全部打开,第二次打开编号为2的倍数的,第三次打开编号为3的倍数的,以此类推...最后问你有几个监狱是打开的 题目中我使用了memset函数来为数组初始化,发现了自己一个以前疏忽的地方 1.void * memset(void*,int,size_t) 这里的size需要注意是以字节为单位,所以当你为个数为n的整型数组赋初值时要这样写memset(name,1,n*sizeof(int)); 2.memset在头文件st…
http://acm.hdu.edu.cn/showproblem.php?pid=1337 #include <cstdio> #include <cstring> #define maxn 200 using namespace std; int main() { int t; int a[maxn]; scanf("%d",&t); int n; while(t--) { scanf("%d",&n); ; i<=…
自己去看看原题; 题目大意: 就是一个狱卒喝醉了,他第一趟吧所有的监狱都带开,第二趟把能把二整除的监狱关闭,第三趟操作能把三整除的监狱; 求最后能逃跑的罪犯数 输入第一个数是代表 测试数据组数 每个数据代表狱卒来回的次数 当作开关问题即可 #include<iostream> using namespace std; int main() { int n; cin>>n; while(n--) { int a; int aa[120]={1}; cin>>a; int…
题目链接: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…