随笔分类 - 模拟
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4527 这道题一开始做得时候没有思考周全,考虑了要爆炸的水滴的时间,但是没有考虑那些还没有爆炸的水珠应该在什么时候加1,这道题一定要以时刻来衡量。 当前的水珠爆炸,它的4个小水珠飞到相邻格子里是下一秒的
阅读全文
摘要:注意按字典序的时候比较所有字母。 #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<math.h> #include<queue> #include<algorithm> using n
阅读全文
摘要:在n*n的方阵里填入 1,2,3,4 ,.....n*n ,要求填入蛇形,例如 n=4时的方阵为10 11 12 19 16 13 28 15 14 37 6 5 4#include #include #include#include #define MAXN 10int ma...
阅读全文
摘要:有n盏灯,编号为1~n,第一个人把所有灯都打开,第2个人按下所有编号为2的倍数的开关(这些灯将会被关掉),第三个人按下所有编号为3的倍数的开关(其中关掉的灯将被打开,开着的灯将被关闭),一次类推,一共有k个人,问最后那些灯开着?#include #include#include int main()...
阅读全文

浙公网安备 33010602011771号