ACM
Hans_Moe
这个作者很懒,什么都没留下…
展开
-
HDU-1241 Oil Deposits(简单DFS)
DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that...原创 2018-03-30 18:39:57 · 289 阅读 · 1 评论 -
HDU-1272 小希的迷宫(并查集)
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的...原创 2018-12-26 09:23:15 · 227 阅读 · 0 评论 -
HDU-2391 Filthy Rich(简单DP)
They say that in Phrygia, the streets are paved with gold. You’re currently on vacation in Phrygia, and to your astonishment you discover that this is to be taken literally: small heaps of gold are di...原创 2018-12-02 07:19:18 · 188 阅读 · 0 评论 -
UVA-294 Divisors(线性筛+唯一分解定理)
Mathematicians love all sorts of odd properties of numbers. For instance, they consider 945 to be an interesting number, since it is the first odd number for which the sum of its divisors is larger th...原创 2018-12-02 07:11:55 · 346 阅读 · 0 评论 -
HDU-1260 Tickets(简单DP)
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as...原创 2018-11-28 17:04:18 · 407 阅读 · 0 评论 -
HDU-2674 N!Again
WhereIsHeroFrom: Zty, what are you doing ? Zty: I want to calculate N!...... WhereIsHeroFrom: So easy! How big N is ? Zty: ...原创 2018-11-28 16:31:57 · 198 阅读 · 0 评论 -
HDU-1212 Big Number(同余定理)
As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B. To make the problem easier, I promise that B will ...原创 2018-11-28 16:19:53 · 197 阅读 · 0 评论 -
UVA-11827 Maximum GCD(辗转相除法求GCD)
Given the N integers, you have to find the maximum GCD (greatest common divisor) of every possible pair of these integers. Input The first line of input is an integer N (1 < N < 100) that dete...原创 2018-11-28 15:58:36 · 276 阅读 · 0 评论 -
HDU-2062 Subset sequence
Consider the aggregate An= { 1, 2, …, n }. For example, A1={1}, A3={1,2,3}. A subset sequence is defined as a array of a non-empty subset. Sort all the subset sequece of An in lexicography order. Your...原创 2018-12-01 11:37:03 · 260 阅读 · 0 评论 -
UVA-10325 The Lottery(二进制状态枚举)
The Sports Association of Bangladesh is in great problem with their latest lottery ‘Jodi laiga Jai’. There are so many participants this time that they cannot manage all the numbers. In an urgent meet...原创 2018-12-02 18:59:55 · 359 阅读 · 0 评论 -
HDU-4709 Herding
Little John is herding his father's cattles. As a lazy boy, he cannot tolerate chasing the cattles all the time to avoid unnecessary omission. Luckily, he notice that there were N trees in the meadow ...原创 2018-12-02 07:52:51 · 301 阅读 · 0 评论 -
UVA-11582 Colossal Fibonacci Numbers!(斐波那契循环节)
The i’th Fibonacci number f(i) is recursively defined in the following way: • f(0) = 0 and f(1) = 1 • f(i + 2) = f(i + 1) + f(i) for every i ≥ 0 Your task is to compute some value...原创 2018-12-02 07:43:00 · 192 阅读 · 0 评论 -
HDU - 2124 Repair The Wall (贪心水题)
DescriptionLong time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everything is t...原创 2018-03-28 19:27:37 · 311 阅读 · 0 评论 -
HDU-1016 Prime Ring Problem
DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the ...原创 2018-03-30 19:23:36 · 220 阅读 · 0 评论 -
HDU-1213 How Many Tables(并查集基础)
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, a...原创 2018-12-26 09:41:38 · 230 阅读 · 0 评论