- 博客(23)
- 收藏
- 关注
原创 Another Sith Tournament
链接:http://acm.hust.edu.cn/vjudge/problem/401746/origin 题目: The rules of Sith Tournament are well known to everyone. n Sith take part in the Tournament. The Tournament starts with the random
2016-09-04 17:20:22 316
原创 Iterated Linear Function
链接:http://acm.hust.edu.cn/vjudge/problem/401745/origin 题目:Consider a linear function f(x) = Ax + B. Let's define g(0)(x) = x and g(n)(x) = f(g(n - 1)(x)) for n > 0. For the given integer values
2016-09-04 17:09:12 405
原创 Joty and Chocolate
链接:http://acm.hust.edu.cn/vjudge/problem/401744/origin 题目: Little Joty has got a task to do. She has a line of n tiles indexed from 1 to n. She has to paint them in a strange pattern. An unp
2016-09-04 16:59:41 410
原创 The Same Calendar
链接:http://acm.hust.edu.cn/vjudge/problem/401743/origin 题目: The girl Taylor has a beautiful calendar for the year y. In the calendar all days are given with their days of week: Monday, Tuesday,
2016-09-04 16:54:53 409
原创 Johny Likes Numbers
链接:http://acm.hust.edu.cn/vjudge/problem/401740/origin 题目:Johny likes numbers n and k very much. Now Johny wants to find the smallest integer x greater than n, so it is divisible by the number
2016-09-04 16:49:17 266
原创 Jam's balance
链接: 题目:Jim has a balance and N weights. $(1 \leq N \leq 20)$ The balance can only tell whether things on different side are the same weight. Weights can be put on left side or right side arbitr
2016-09-04 16:25:45 404
原创 Safecracker
链接:http://acm.hust.edu.cn/vjudge/problem/18952/origin 题目:=== Op tech briefing, 2002/11/02 06:42 CST === "The item is locked in a Klein safe behind a painting in the second-floor library. Klein sa
2016-09-04 16:16:35 166
原创 又见GCD
链接:http://acm.hust.edu.cn/vjudge/problem/25715/origin 题目:有三个正整数a,b,c(0 题意:。 分析:数据不是很大,其实可以从2*b开始枚举,用gcd(辗转相除)的快捷方法验证的 (图转,侵删。。) 我用了比较笨的方法:把a和b分解质因数,再从a中把b的质因数剔除出去,然后开始从小枚举选择c除去b的质因数(只要不出现
2016-09-04 15:55:45 498
原创 棋盘问题
链接:http://acm.hust.edu.cn/vjudge/problem/15202/origin 题目: 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 题意:。 分析:这是一道类似八皇后的dfs题,
2016-09-04 15:47:24 193
原创 Sticks
链接:http://acm.hust.edu.cn/vjudge/problem/14913/origin 题目:George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to t
2016-09-04 15:38:57 627
原创 迷宫问题
链接:http://acm.hust.edu.cn/vjudge/problem/19699/origin 题目:定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,
2016-09-04 15:22:06 475
原创 N皇后问题
链接:http://acm.hust.edu.cn/vjudge/problem/33634/origin 题目:在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 题意:.. 分析:首先这是一道经典的dfs,或者回溯递归题,当年在数据结
2016-09-04 15:11:35 254
原创 Connecting Universities
链接:http://acm.hust.edu.cn/vjudge/problem/427647/origin 题目: Treeland is a country in which there are n towns connected by n - 1 two-way road such that it's possible to get from any town to any
2016-09-03 21:45:56 270
原创 As Fast As Possible
链接:http://acm.hust.edu.cn/vjudge/problem/427646/origin 题目: On vacations n pupils decided to go on excursion and gather all together. They need to overcome the path with the length l meters. E
2016-09-03 21:42:22 405
原创 They Are Everywhere
链接:http://acm.hust.edu.cn/vjudge/problem/427892/origin 题目: Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is
2016-09-03 21:35:22 291
原创 Cells Not Under Attackvct
链接:http://acm.hust.edu.cn/vjudge/problem/427645/origin 题目: Vasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks
2016-09-03 21:23:52 222
原创 Vasiliy's Multiset
链接:http://acm.hust.edu.cn/vjudge/problem/460314/origin 题目: Author has gone out of the stories about Vasiliy, so here is just a formal task description. You are given q queries and a multiset
2016-09-03 17:51:49 351
原创 Another Meaning
链接:http://acm.hust.edu.cn/vjudge/problem/435534/origin 题目:As is known to all, in many cases, a word has two meanings. Such as “hehe”, which not only means “hehe”, but also means “excuse me”. T
2016-09-03 17:39:31 315
原创 Hat’s Words
链接:http://acm.hust.edu.cn/vjudge/problem/18360/origin 题目:A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the
2016-09-03 17:31:56 188
原创 Shortest Prefixes
链接:http://acm.hust.edu.cn/vjudge/problem/11157/origin 题目:A prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", "car", "carb", "
2016-09-03 17:30:23 214
原创 Seek the Name, Seek the Fame
链接:http://acm.hust.edu.cn/vjudge/problem/10055/origin 题目:The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-b
2016-09-03 17:08:41 160
原创 Crazy Search
链接:http://acm.hust.edu.cn/vjudge/problem/17714/origin 题目:Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a g
2016-09-03 17:06:26 281
原创 Oulipo
链接:http://acm.hust.edu.cn/vjudge/problem/10368/origin 题目: The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo
2016-09-03 16:49:17 183
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人