随笔分类 -  8-1-乱搞-思维

摘要:DreamGrid has just found an integer sequence in his right pocket. As DreamGrid is bored, he decides to play with the sequence. He can perform the foll 阅读全文
posted @ 2019-05-18 21:57 yzm10 阅读(645) 评论(0) 推荐(0)
摘要:Magic Odd Square Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd. Input The o 阅读全文
posted @ 2019-03-16 23:32 yzm10 阅读(357) 评论(0) 推荐(0)
摘要:Find an element in hidden array There is an array of length N consisting of non-negative integers. The array is sorted in non-decreasing order. Each n 阅读全文
posted @ 2018-10-07 22:32 yzm10 阅读(308) 评论(0) 推荐(0)
摘要:String Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of length M*L; (ii) It can be 阅读全文
posted @ 2018-10-06 21:06 yzm10 阅读(364) 评论(0) 推荐(0)
摘要:Adjustment Office Gym - 100851A 2 3 4 3 4 5 4 5 6 n<=10^6,q<=10^5 每个坐标点的值为x+y。 q次查询,每次求某行或某列的和,然后清空。 in out 3 7 12R 2 10C 3 0R 2 5R 1 5C 2 4C 1 0R 3 阅读全文
posted @ 2018-09-27 22:49 yzm10 阅读(269) 评论(0) 推荐(0)
摘要:Decoding of Varints Statements Varint is a type used to serializing integers using one or more bytes. The key idea is to have smaller values being enc 阅读全文
posted @ 2018-09-27 22:30 yzm10 阅读(321) 评论(0) 推荐(0)
摘要:题目4 : 80 Days 题目4 : 80 Days 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 80 Days is an interesting game based on Jules Verne's science fiction "Around the Wo 阅读全文
posted @ 2018-09-22 19:12 yzm10 阅读(623) 评论(0) 推荐(0)
摘要:UVA - 13022 Sheldon Numbers 二进制形式满足ABA,ABAB数的个数(A为一定长度的1,B为一定长度的0)。 其实就是寻找在二进制中满足所有的1串具有相同的长度,所有的0串也具有相同的长度,并且在给定范围内的个数。 位运算。通过分析不难发现,所有解不会很大,因此我们可以暴力 阅读全文
posted @ 2018-09-14 16:01 yzm10 阅读(175) 评论(0) 推荐(0)
摘要:Features Track 31.32% 1000ms 262144K Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat 阅读全文
posted @ 2018-09-09 17:13 yzm10 阅读(488) 评论(0) 推荐(0)
摘要:Function The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array AA of NN postive integers, and MM  阅读全文
posted @ 2018-08-31 17:25 yzm10 阅读(155) 评论(0) 推荐(0)
摘要:Do you know what is called ``Coprime Sequence''? That is a sequence consists of nnpositive integers, and the GCD (Greatest Common Divisor) of them is 阅读全文
posted @ 2018-08-24 20:52 yzm10 阅读(114) 评论(0) 推荐(0)
摘要:Parentheses Matrix Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0S 阅读全文
posted @ 2018-08-15 17:58 yzm10 阅读(153) 评论(0) 推荐(0)
摘要:Sequence Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1731 Accepted Submission(s): 656 Probl 阅读全文
posted @ 2018-08-14 23:09 yzm10 阅读(305) 评论(0) 推荐(0)
摘要:Shuffle Cards 链接:https://www.nowcoder.com/acm/contest/141/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: 阅读全文
posted @ 2018-07-26 21:26 yzm10 阅读(346) 评论(0) 推荐(0)
摘要:Covering Covering Bob's school has a big playground, boys and girls always play games here after school. To protect boys and girls from getting hurt w 阅读全文
posted @ 2018-07-15 16:22 yzm10 阅读(447) 评论(0) 推荐(1)
摘要:Fibonacci-ish Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if You are given s 阅读全文
posted @ 2018-04-05 22:23 yzm10 阅读(267) 评论(0) 推荐(0)
摘要:河老师的新年礼物 发布时间: 2017年1月1日 15:11 最后更新: 2017年1月1日 15:13 时间限制: 1000ms 内存限制: 256M 描述 河老师的新年礼物是一个长度为n的ab串,他想要找出最长的一个子串使得这个子串中每个字符都相等,他称之为“最优子串”。当然对河老师来说这个问题 阅读全文
posted @ 2017-08-18 23:58 yzm10 阅读(336) 评论(0) 推荐(0)
摘要:Color the ball N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几 阅读全文
posted @ 2017-08-08 20:36 yzm10 阅读(205) 评论(0) 推荐(1)
摘要:B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new 阅读全文
posted @ 2017-07-30 17:12 yzm10 阅读(366) 评论(0) 推荐(0)
摘要:Maze Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another 阅读全文
posted @ 2017-07-24 20:44 yzm10 阅读(402) 评论(1) 推荐(0)