上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1069 有N堆石子。A B两个人轮流拿,A先拿。每次只能从一堆中取若干个,可将一堆全取走,但不可不取,拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程 阅读全文
posted @ 2017-08-12 10:53 wydxry 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1072 有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿 阅读全文
posted @ 2017-08-12 10:49 wydxry 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1185 有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿 阅读全文
posted @ 2017-08-12 10:43 wydxry 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc069.contest.atcoder.jp/assignments A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, 阅读全文
posted @ 2017-08-12 10:21 wydxry 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2176 m堆石子,两人轮流取.只能在1堆中取.取完者胜.先取者负输出No.先取者胜输出Yes,然后输出怎样取子.例如5堆 5,7,8,9,10先取者胜,先取者第1次取时可以从有8个的那一堆取走7个剩下1个 阅读全文
posted @ 2017-08-09 19:06 wydxry 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1846 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试 阅读全文
posted @ 2017-08-09 17:11 wydxry 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2516 1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出"Second win".先取者胜输出"First win 阅读全文
posted @ 2017-08-09 16:19 wydxry 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1527 有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜 阅读全文
posted @ 2017-08-09 15:52 wydxry 阅读(267) 评论(0) 推荐(0) 编辑
摘要: POJ 3624 Charm Bracelet 题目链接:http://poj.org/problem?id=3624 Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of cou 阅读全文
posted @ 2017-08-08 11:24 wydxry 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1 O(n^2)的方法: 2 #include <iostream> 3 #include <stdio.h> 4 #include <cstring> 5 #include <algorithm> 6 using namespace std; 7 int a[15010],dp[15010],fr 阅读全文
posted @ 2017-08-07 18:08 wydxry 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <vector> 6 #include <cstdlib> 7 #include <iomanip> 8 阅读全文
posted @ 2017-08-07 17:20 wydxry 阅读(409) 评论(0) 推荐(0) 编辑
摘要: HDU 2012 素数判定 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2012 对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39<=x<y<=50),判定该表达式的值是否都为素数。 Input输入数据有多组,每组占 阅读全文
posted @ 2017-08-07 16:54 wydxry 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3624 Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the 阅读全文
posted @ 2017-08-07 16:24 wydxry 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1085 在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够 阅读全文
posted @ 2017-08-07 16:20 wydxry 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1789 Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other f 阅读全文
posted @ 2017-08-07 15:10 wydxry 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1996 n个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系列。由于 发生错移产生的系列就增加了,这种错误是放错了柱子,并不会把大盘放到小盘上,即各柱 子从下往上的大小仍保持如下 阅读全文
posted @ 2017-08-07 10:47 wydxry 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2511 1,2,...,n表示n个盘子.数字大盘子就大.n个盘子放在第1根柱子上.大盘不能放在小盘上.在第1根柱子上的盘子是a[1],a[2],...,a[n]. a[1]=n,a[2]=n-1,..., 阅读全文
posted @ 2017-08-07 10:42 wydxry 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2175 1,2,...,n表示n个盘子.数字大盘子就大.n个盘子放在第1根柱子上.大盘不能放在小盘上. 在第1根柱子上的盘子是a[1],a[2],...,a[n]. a[1]=n,a[2]=n-1,... 阅读全文
posted @ 2017-08-07 10:26 wydxry 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2077 还记得汉诺塔III吗?他的规则是这样的:不允许直接从最左(右)边移到最右(左)边(每次移动一定是移到中间杆或从中间移出),也不允许大盘放到小盘的上面。xhd在想如果我们允许最大的盘子放到最上面会怎 阅读全文
posted @ 2017-08-07 10:14 wydxry 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2064 约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下、由小到大顺序串着由64个圆盘构成的塔。目的是将最左边杆上的盘全部移到右边的杆上,条件是一次只能移动一个盘, 阅读全文
posted @ 2017-08-07 10:00 wydxry 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3461 A lock you use has a code system to be opened instead of a key. The lock contains a sequence of wh 阅读全文
posted @ 2017-08-06 19:01 wydxry 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3038 TT and FF are ... friends. Uh... very very good friends -________-b FF is a bad boy, he is always 阅读全文
posted @ 2017-08-06 16:58 wydxry 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 用1,2,...,n表示n个盘子,称为1号盘,2号盘,...。号数大盘子就大。经典的汉诺塔问 题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于 印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小 顺序摞着64片黄金圆盘。上帝命令婆罗门把圆 阅读全文
posted @ 2017-08-06 16:31 wydxry 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小顺序摞着64片黄金圆盘。上帝命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,在三 阅读全文
posted @ 2017-08-06 16:12 wydxry 阅读(355) 评论(0) 推荐(0) 编辑
摘要: These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their s 阅读全文
posted @ 2017-08-06 15:25 wydxry 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希 阅读全文
posted @ 2017-08-06 14:39 wydxry 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://hihocoder.com/problemset/problem/1037# 问题描述 小Hi和小Ho在经历了螃蟹先生的任务之后被奖励了一次出国旅游的机会,于是他们来到了大洋彼岸的美国。美国人民的生活非常有意思,经常会有形形色色、奇奇怪怪的活动举办,这不,小Hi和小Ho刚刚 阅读全文
posted @ 2017-08-05 17:54 wydxry 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1256 给出2个数M和N(M < N),且M与N互质,找出一个数K满足0 < K < N且K * M % N = 1,如果有多个满足条件的,输出最小的。 给出2个 阅读全文
posted @ 2017-08-05 16:35 wydxry 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://arc077.contest.atcoder.jp/tasks/arc077_b Time limit : 2sec / Memory limit : 256MB Score : 600 points Problem Statement You are given an in 阅读全文
posted @ 2017-08-05 16:07 wydxry 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://arc077.contest.atcoder.jp/tasks/arc077_a Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement You are given an in 阅读全文
posted @ 2017-08-05 15:44 wydxry 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc066.contest.atcoder.jp/tasks/abc066_b Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement We will call a stri 阅读全文
posted @ 2017-08-05 15:12 wydxry 阅读(350) 评论(0) 推荐(0) 编辑
摘要: Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement You are given a string S consisting of digits between 1 and 9, inclusive 阅读全文
posted @ 2017-08-05 11:23 wydxry 阅读(580) 评论(0) 推荐(0) 编辑
摘要: Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement Alice, Bob and Charlie are playing Card Game for Three, as below: At fir 阅读全文
posted @ 2017-08-05 11:02 wydxry 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc044.contest.atcoder.jp/tasks/arc060_a Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement Tak has N cards. On 阅读全文
posted @ 2017-08-05 10:01 wydxry 阅读(576) 评论(0) 推荐(0) 编辑
摘要: Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement Let w be a string consisting of lowercase letters. We will call w beauti 阅读全文
posted @ 2017-08-05 01:33 wydxry 阅读(577) 评论(0) 推荐(0) 编辑
摘要: Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement There is a hotel with the following accommodation fee: X yen (the curren 阅读全文
posted @ 2017-08-05 01:31 wydxry 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc043.contest.atcoder.jp/tasks/arc059_b Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement Given a string t, w 阅读全文
posted @ 2017-08-05 00:38 wydxry 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc043.contest.atcoder.jp/tasks/arc059_a Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement Evi has N integers  阅读全文
posted @ 2017-08-04 23:55 wydxry 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc043.contest.atcoder.jp/tasks/abc043_b Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement Sig has built his o 阅读全文
posted @ 2017-08-04 21:34 wydxry 阅读(1854) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://abc042.contest.atcoder.jp/tasks/arc058_b Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement We have a large squ 阅读全文
posted @ 2017-08-04 20:51 wydxry 阅读(77191) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
Live2D