上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页
摘要: 题目链接https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=473= =这题就是就是给你一个三维的图,然后给你一个起点,一个终点... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 原题链接https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=598这题就是在一堆*里找X,相邻的X算一个,所以我们可以两次dfs... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(109) 评论(0) 推荐(0) 编辑
摘要: B. Bear and Three Musketeerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDo y... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1050如果没有循环的条件,那么我们可以用常规的方法算出最大的字段和max1然后加上循环这个条件,我们可以先求出整个数组的和,然后在求... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 有一堆石子共有N个。A B两个人轮流拿,A先拿。每次最少拿1颗,最多拿K颗,拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出N和K,问最后谁能赢得比赛。例如N = 3,K = 2。无论A如何拿,B都可以拿到最后1颗石子。Input第1行... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://www.51nod.com/onlineJudge/questionCode.html#problemId=1095&noticeId=20791老实说这题,我是很不想用字典树,因为不熟~~~但后来没搞出来,就用了字典树。。。。。。。。。。当然... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 就是一个国际象棋的棋盘,可以八个方向走,问从起点到终点的最少步数是多少,还给出一个一个点是不可走的,简单的bfs#include#include#include#include#include#include using namespace std;int vis[1... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 原题链接http://acm.hdu.edu.cn/showproblem.php?pid=5410因为他每买一件物品就会得到Ai颗糖,每买一种物品就会得到Bi颗糖。有两个价值。。所以我们应该先用一次01背包把两个价值统一起来。。。因为01背包中每种物品只能取一次。。... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 原题链接http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1126这题我们应该先求出他的周期来。。。。。 for(i=3;i#include#include#includeusing names... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=5400这题其实就是求有多少公差为d1和公差为d2的等差序列和前半段是公差为d1后半段的公差为d2的序列。。。。。我们可以用个b数组保存序列中相邻两项的和,然后直接查找b数组... 阅读全文
posted @ 2015-12-31 08:42 __NaCl 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页