水
文章平均质量分 81
saintjasper
这个作者很懒,什么都没留下…
展开
-
POJ #2586 Y2K Accounting Bug
Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc.All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS Inc. pos原创 2020-12-06 20:10:14 · 287 阅读 · 0 评论 -
LightOJ #1010 - Knights in Chessboard
原题地址题目意思:m*n的棋盘上,骑士不能相互攻击,找出能放骑士的最大数,骑士的攻击位置如图所示输入:整数T(<=41000),测试数量,每一个测试包含两个整数m,n(1<=m,n<=200),表示行数m和列数n输出:每一个测试输出一个整数,表示能放的最大骑士数,并标上Case数思路:找规律,很明显,如图,骑士放在黑格位置时,只能攻击白格上的敌人,所以只用求出每个棋盘上黑格的数量,利用向下取整,数量即为(m*n+1)/2,此时要求m,n>=3当然若m或n等于1时,能放的最原创 2020-12-06 20:59:33 · 139 阅读 · 0 评论 -
LightOJ #1008 Fibsieve`s Fantabulous Birthday
原题地址题目意思:张三开生日派对,被送的一堆礼物中有一个N*N的玻璃棋板,每一格都有一盏灯,棋板打开时,每秒钟都会有一盏灯闪亮然后熄灭,亮灯的顺序如表,(比如 第3秒的时候亮编号为3的灯,坐标为(2,1),第10秒亮编号为10的灯,坐标为(1,4)),然后排列有规律,棋板的长度N足够大输入:T(<=200),测试数量,然后下面T行,每一行一个整数S(1<=S<=10^15),表示时间秒输出:每一个测试输出亮灯的坐标,并写上Case数。思路:找规律,不难发现,第一行,从1后,每原创 2020-12-06 20:44:14 · 97 阅读 · 0 评论 -
HDU #2138 How many prime numbers
原题地址Problem DescriptionGive you a lot of positive integers, just to find out how many prime numbers there are.InputThere are a lot of cases. In each case, there is an integer N representing the number of integers to find. Each integer won’t exceed 32-b原创 2020-12-06 22:04:44 · 146 阅读 · 0 评论 -
HDU #5879 Cure
Problem DescriptionGiven an integer n, we only want to know the sum of 1/k2 where k from 1 to n.InputThere are multiple cases.For each test case, there is a single line, containing a single positive integer n.The input file is at most 1M.OutputThe r原创 2020-12-06 22:15:11 · 102 阅读 · 0 评论