上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 32 下一页
摘要: 2014-09-0314:42:58经典的俄罗斯轮盘。不说啥了。 1 /************************************************************************* 2 > File Name: Uva1636.cpp 3 > A... 阅读全文
posted @ 2014-09-03 14:43 Naturain 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0313:29:33题目老长:放链接。思路:直接模拟。 1 /************************************************************************* 2 > File Name: Uva1262.cpp 3 ... 阅读全文
posted @ 2014-09-03 13:33 Naturain 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0300:58:22原题题目老长,不多说了,小白书例题。思路:1 y,对于某个给定的x,(x,y)的对数就是其欧拉函数值。所以把1~n的所有欧拉函数值求出来 × 2就行了(因为先设定x>y,所以×2),最后要减去1(因为(1,1)算重了一次) 1 /****************... 阅读全文
posted @ 2014-09-03 01:02 Naturain 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0221:40:461635 - Irrelevant ElementsTime limit: 3.000 secondsYoung cryptoanalyst Georgie is investigating different schemes of generating rand... 阅读全文
posted @ 2014-09-02 21:45 Naturain 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0219:13:3212716 GCD XOR题意:输入整数n(1= b) (3)若 gcd(a,b)= a xor b = c ,(a >= b),由(2)得:a - b = k2),所以 a - b = (k1 - k2)× c,所以 a - b >= c。总:a ... 阅读全文
posted @ 2014-09-02 19:27 Naturain 阅读(1299) 评论(0) 推荐(1) 编辑
摘要: 2014-09-0216:21:26Minimum Sum LCMLCM(Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all integers... 阅读全文
posted @ 2014-09-02 16:23 Naturain 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0215:40:07寒假安排Time Limit:2000/1000MS (Java/Others)Memory Limit:128000/64000KB (Java/Others)Problem Description寒假又快要到了,不过对于lzx来说,头疼的事又来了,因为众多的后... 阅读全文
posted @ 2014-09-02 15:43 Naturain 阅读(539) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0122:31:12思路:暴力DFS,学了学邻接表的数组实现。 1 /************************************************************************* 2 > File Name: bz2435.cpp 3 ... 阅读全文
posted @ 2014-09-01 22:32 Naturain 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0120:08:45Problem D: Choose and divideThe binomial coefficientC(m,n)is defined as m!C(m,n) = -------- n!(m-n)!Given four natur... 阅读全文
posted @ 2014-09-01 20:16 Naturain 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 2014-09-0115:04:0512169 - Disgruntled JudgeTime limit: 3.000 secondsOnce upon a time, there was annwercjudge with a tendency to create slightly too ha... 阅读全文
posted @ 2014-09-01 15:15 Naturain 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 2014-08-3116:58:59A/BTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2305Accepted Submission(s): 1... 阅读全文
posted @ 2014-08-31 17:14 Naturain 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 2014-08-3113:40:13See LCS again时间限制:1000ms | 内存限制:65535KB难度:3描述There are A, B two sequences, the number of elements in the sequence is n、m;Each elemen... 阅读全文
posted @ 2014-08-31 13:43 Naturain 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 2014-08-3023:39:21Problem F: Colossal Fibonacci Numbers!Thei'th Fibonacci numberf(i)is recursively defined in the following way:f(0) = 0andf(1) = 1f(i... 阅读全文
posted @ 2014-08-30 23:42 Naturain 阅读(1203) 评论(0) 推荐(0) 编辑
摘要: 2014-08-3020:56:12A题,不说什么了- =,只能买一颗糖的设定太违和了,唯一的小trick:某颗糖为a dollas,0 cent的话找0个糖而不是100。 1 /************************************************************... 阅读全文
posted @ 2014-08-30 21:17 Naturain 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 2014-08-3012:34:4612170 - Easy ClimbTime limit: 3.000 secondsSomewhere in the neighborhood we have a very nice mountain that gives a splendid view ove... 阅读全文
posted @ 2014-08-30 12:56 Naturain 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 2014-08-2912:46:35An array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very... 阅读全文
posted @ 2014-08-29 12:50 Naturain 阅读(370) 评论(4) 推荐(0) 编辑
摘要: 2014-08-2823:16:47(这题图抠不下来,也是醉了-。-),题目链接思路:典型的树形DP,小白书例题,状态有点多,所以第二维要开三个状态,dp[N][3]。(1)dp[u][0] 表示 u 是服务器,以 u 为根的子树最优解。(2)dp[u][1] 表示 u 不是服务器,但 u 的父节点... 阅读全文
posted @ 2014-08-28 23:27 Naturain 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 2014-08-2817:11:101220 - Party at Hali-BulaTime limit: 3.000 secondsDear Contestant,I'm going to have a party at my villa at Hali-Bula to celebrate my... 阅读全文
posted @ 2014-08-28 17:18 Naturain 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 2014-08-2813:36:4512186 - Another CrisisA couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some wor... 阅读全文
posted @ 2014-08-28 15:09 Naturain 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 2014-08-2722:17:30Root1331 - Minimax TriangulationTime limit: 3.000 secondsTriangulation of surfaces has applications in the Finite Element Method of ... 阅读全文
posted @ 2014-08-27 22:26 Naturain 阅读(289) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 32 下一页