
POJ
文章平均质量分 91
Tizzii
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Censored! POJ - 1625 ac自动机+dp+高精度
一、内容The alphabet of Freeland consists of exactly N letters. Each sentence of Freeland language (also known as Freish) consists of exactly M letters without word breaks. So, there exist exactly N^M di...原创 2020-03-29 21:06:28 · 584 阅读 · 0 评论 -
DNA Sequence POJ - 2778 ac自动机+矩阵快速幂
一、内容It's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For example, if a animal's DNA sequence contains segment ATC...原创 2020-03-27 21:38:43 · 648 阅读 · 1 评论 -
POJ 3080 Blue Jeans kmp
一、内容The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was populat...原创 2020-03-05 17:04:40 · 1178 阅读 · 1 评论 -
POJ 2752 Seek the Name, Seek the Fame next数组应用
一、内容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-born babies. They seek the name, and at the same time se...原创 2020-03-05 16:23:20 · 414 阅读 · 0 评论 -
POJ 2406 Power Strings 最小循环节
一、内容Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by a...原创 2020-03-05 16:00:01 · 615 阅读 · 0 评论 -
POJ 1308 Is It A Tree?
一、内容A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.T...原创 2020-03-03 12:30:48 · 487 阅读 · 0 评论 -
POJ 2912 Rochambeau 带权并查集
一、内容N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don...原创 2020-03-02 17:09:10 · 761 阅读 · 0 评论 -
POJ 2492 A Bug's Life 带权并查集
一、内容BackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite ...原创 2020-03-02 12:03:25 · 725 阅读 · 0 评论 -
POJ 1984 Navigation Nightmare 多权值并查集
一、内容Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying length...原创 2020-03-02 11:36:45 · 565 阅读 · 0 评论 -
POJ 1417 True Liars 带权并查集 + 背包
一、内容After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to rem...原创 2020-03-01 17:03:33 · 966 阅读 · 0 评论 -
POJ - 1182 食物链 带权并查集
一、内容动物王国中有三类动物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个动物,用上述两种说法,一句接一句地说出K句话...原创 2020-03-01 13:51:06 · 520 阅读 · 0 评论 -
POJ - 1733 Parity game 带权并查集
一、内容Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence from ...原创 2020-02-29 20:12:07 · 739 阅读 · 0 评论 -
POJ 3189 Steady Cow Assignment 二分+枚举+多重匹配
一、内容Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of course, have limited capacity. Some cows really like their current barn, and some are not ...原创 2020-02-27 20:53:10 · 553 阅读 · 1 评论 -
POJ 2112 Optimal Milking 二分 + 多重匹配 +Floyd
一、内容FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs among the cows and the milking ma...原创 2020-02-27 19:50:16 · 506 阅读 · 0 评论 -
POJ 2289 Jamie's Contact Groups 多重匹配+二分
一、内容Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list has become so long that it often takes a long time fo...原创 2020-02-27 17:59:51 · 1681 阅读 · 0 评论 -
POJ 2594 Treasure Exploration 最小路径重复点覆盖
一、内容Have you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never...原创 2020-02-27 15:27:19 · 555 阅读 · 0 评论 -
POJ 3020 Antenna Placement 最小路径点覆盖
一、内容The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of ...原创 2020-02-26 17:25:02 · 602 阅读 · 0 评论 -
HDU - 4685 Prince and Princess 完美匹配+SCC
一、内容 There are n princes and m princesses. Princess can marry any prince. But prince can only marry the princess they DO love.For all princes,give all the princesses that they love. So, there is a m...原创 2020-02-23 21:24:46 · 761 阅读 · 1 评论 -
HDU 4738 Caocao's Bridges 桥
一、内容 Caocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn't give up. Caocao's army still was not good at water battles, so he came up with another idea. He built many ...原创 2020-02-22 15:27:18 · 635 阅读 · 0 评论 -
HDU 4635 Strongly connected 填边判强连通
一、内容 Give a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the graph is still a simple directed graph. Also, after you add these edges...原创 2020-02-22 12:11:46 · 633 阅读 · 0 评论 -
POJ 3694 Network DCC + LCA
一、内容A network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers are connected directly or indirectly by successi...原创 2020-02-21 20:03:06 · 723 阅读 · 0 评论 -
POJ 1236 Network of Schools SCC
一、内容A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the “receivi...原创 2020-02-12 20:19:46 · 676 阅读 · 0 评论 -
POJ 3417 Network 树上差分
一、内容Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes that DxtNetwork(DN), the SN's business rival, intents to at...原创 2020-02-11 17:54:43 · 684 阅读 · 0 评论 -
POJ 1679 The Unique MST
一、内容Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgra...原创 2020-02-09 21:30:43 · 688 阅读 · 0 评论 -
POJ 3026 Borg Maze P 最小生成树
一、内容The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg civilizati...原创 2020-02-09 20:40:11 · 853 阅读 · 0 评论 -
POJ 3255 Roadblocks 次短路
一、内容Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along the way...原创 2020-02-09 17:48:27 · 1887 阅读 · 0 评论 -
POJ 1751 Highways 最小生成树
一、内容The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a...原创 2020-02-09 15:33:52 · 648 阅读 · 0 评论 -
POJ - 1789 Truck History 最小生成树
一、内容Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of...原创 2020-02-09 11:53:03 · 679 阅读 · 0 评论 -
POJ 2421 Constructing Roads
一、内容There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only...原创 2020-02-09 11:05:15 · 510 阅读 · 0 评论 -
POJ 2349 Arctic Network 最小生成树
一、内容The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: ev...原创 2020-02-08 15:24:08 · 623 阅读 · 0 评论 -
POJ 3169 Layout 差分约束
一、内容Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows ...原创 2020-02-07 22:32:37 · 678 阅读 · 0 评论 -
POJ 1062 昂贵的聘礼
一、内容 某天超市搞活动,小明想买一个自己一直想买的电脑,平时需要7000,小明觉得太贵了。但活动当天,超市里的商品可以通过买其他商品获得优惠券。例如买一个键盘然后买电脑只需要5000,如果买一个鼠标买电脑只需要4000。同理,买其他商品也有这样的优惠活动。但商场出于某种目的,给每一件商品都标了等级,如果买了低于某个等级的商品,就不能够再买某些高级商品。为了方便,商店将每一件商品从1开始编号,...原创 2020-02-06 16:25:52 · 1462 阅读 · 0 评论 -
POJ2502 Subway 最短路
一、内容You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you don't ...原创 2020-02-06 14:54:40 · 655 阅读 · 0 评论 -
POJ3159 Candies 差分约束
一、内容During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. Al...原创 2020-02-06 12:19:11 · 671 阅读 · 0 评论 -
POJ1275 Cashier Employment 差分约束 + 二分
一、内容A supermarket in Tehran is open 24 hours a day every day and needs a number of cashiers to fit its need. The supermarket manager has hired you to help him, solve his problem. The problem is that ...原创 2020-02-06 11:24:22 · 1128 阅读 · 1 评论 -
POJ1201 Intervals 差分约束
一、内容You are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:reads the number of intervals, their end points and integers c1, ..., cn from the standard inp...原创 2020-02-05 18:08:07 · 814 阅读 · 0 评论 -
Invitation Cards POJ - 1511 反向建图
一、内容In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. ...原创 2020-02-04 12:01:21 · 632 阅读 · 0 评论 -
Arbitrage POJ - 2240 spfa判环
一、内容Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 B...原创 2020-02-03 22:10:38 · 494 阅读 · 0 评论 -
Cow Contest POJ - 3660 传递闭包 判断大小关系
一、内容N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that ...原创 2020-02-03 21:18:51 · 542 阅读 · 0 评论 -
Wormholes POJ - 3259 判负环
一、内容While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time t...原创 2020-02-03 09:32:24 · 440 阅读 · 0 评论