- 博客(8)
- 收藏
- 关注
转载 dp专题之 B - Islands and Bridges POJ - 2288
Given a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there is also a po...
2019-02-18 17:58:37
172
原创 N!Again
N!Again WhereIsHeroFrom: Zty, what are you doing ? Zty: I want to calculate N!...... WhereIsHeroFrom: So easy! How big N is ? Zty: ...
2018-12-02 18:09:41
145
原创 Big Number
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 promi...
2018-12-02 18:07:46
97
原创 带权并查集
带权并查集例:POJ1182食物链动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物...
2018-12-02 17:55:40
155
原创 Filthy Rich
Filthy Rich 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 heap...
2018-12-02 16:28:28
140
原创 Tickets
TicketsJesus, 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...
2018-12-02 16:21:33
207
原创 Maximum GCD
Maximum GCDGiven the N integers, you have to find the maximum GCD (greatest common divisor) of every possible pair of these integers.InputThe first line of input is an integer N (1 < N &l...
2018-12-02 16:15:15
148
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人