自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 LightOJ - 1104 Birthday Paradox (期望DP)

Birthday Paradox Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a...

2019-11-06 19:07:51 30 0

原创 LightOJ - 1079 Just another Robbery (概率 +背包)

Just another Robbery As Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he deci...

2019-11-06 11:23:44 27 0

原创 LightOJ - 1038 Race to 1 Again (期望DP)

Race to 1 Again Rimi learned a new thing about integers, which is - any positive integer greater than1can be divided by its divisors. So, he is no...

2019-11-06 11:12:43 22 0

原创 LightOJ - 1030 Discovering Gold (期望DP)

Discovering Gold You are in a cave, a long cave! The cave can be represented by a1 x Ngrid. Each cell of the cave can contain any amount of gold. ...

2019-11-06 10:48:49 27 0

原创 LightOJ - 1027 A Dangerous Maze (期望)

A Dangerous Maze You are in a maze; seeingndoors in front of you in beginning. You can choose any door you like. The probability for choosing a do...

2019-11-06 10:34:37 32 0

原创 HDU - 4812 D Tree (点分治 + 逆元预处理 )

D Tree There is a skyscraping tree standing on the playground of Nanjing University of Science and Technology. On each branch of the tree is an in...

2019-10-31 19:56:20 30 0

原创 POJ - 2114 Boatherds (点分治 距离等于k的点对)

Boatherds Boatherds Inc. is a sailing company operating in the country of Trabantustan and offering boat trips on Trabantian rivers. All the river...

2019-10-31 11:22:43 16 0

原创 POJ - 1987 Distance Statistics (点分治 距离小于等于k的点对)

Distance Statistics Frustrated at the number of distance queries required to find a reasonable route for his cow marathon, FJ decides to ask queri...

2019-10-30 09:53:14 188 0

原创 POJ - 1741 Tree (点分治 求路径距离小于等于k的点对)

Tree Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. ...

2019-10-25 18:40:46 61 0

原创 POJ - 1655 Balancing Act (树的重心)

Balancing Act Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collectio...

2019-10-25 11:13:31 23 0

原创 HDU - 5988 Coding Contest (最小费用最大流)

Coding Contest A coding contest will be held in this university, in a huge playground. The whole playground would be divided into N blocks, and th...

2019-10-10 09:42:03 24 0

原创 POJ - 2391 Ombrophobic Bovines (Floyd + 二分 +ISAP)

Ombrophobic Bovines FJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hoo...

2019-10-07 10:59:53 23 0

原创 HihoCoder - 1634 Puzzle Game (最大子矩阵和)

Puzzle Game Once upon a time, there was a little dog YK. One day, he went to an antique shop and was impressed by a beautiful picture. YK loved it...

2019-09-28 09:12:51 22 0

原创 Gym - 101981 Problem M. Mediocre String Problem (扩展KMP + Manacher)

Problem M. Mediocre String Problem 题目链接:https://vjudge.net/problem/Gym-101981M 题目大意:给出两个串S,T,从S中选择 i~j 的子串,再从T中选择前缀 1~k 接在S的子串后面 组成一个新字符串,要求 j-i+1&...

2019-09-25 21:34:02 67 0

原创 2019icpc上海网络赛

比赛链接:The Preliminary Contest for ICPC Asia Shanghai 2019 L. Digit sum 签到题 题目大意:给出n,b,求1-n 的b进制的各个位数之和 思路:因为n就到10^6可以直接预处理打表。 或者也可以数位DP 代码: #in...

2019-09-19 11:13:30 181 2

原创 2019网络赛总结

这么多场网络赛下来,发现了很多自己的不足: 首先就是网络赛中遇到很多题目都是会的算法,但是没办法灵活的运用。就像ccpc网络赛有一道后缀数组+主席树的题,知道是后缀数组,但是不知道要到底要怎么做。还有之前学的有些算法,很久没有用过,现在已经不太熟悉了。 在网络赛中发现现在还是有很多算法是还没有...

2019-09-18 16:28:55 42 0

原创 POJ - 1873 The Fortified Forest (凸包 + 枚举)

The Fortified Forest Once upon a time, in a faraway land, there lived a king. This king owned a small collection of rare and valuable trees, which...

2019-09-12 20:39:31 70 0

原创 POJ - 1228 Grandpa's Estate (稳定凸包 )

Grandpa's Estate Being the only living descendant of his grandfather, Kamran the Believer inherited all of the grandpa's belongings. The...

2019-09-12 17:36:03 26 0

原创 POJ - 1265 Area (计算几何 Pick定理 叉积)

Area Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-n...

2019-09-12 10:23:49 26 0

原创 POJ - 1654 Area (计算几何 叉积 求多边形面积)

Area You are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. ...

2019-09-11 20:48:29 29 0

原创 LightOJ - 1203 Guarding Bananas(凸包 求最小夹角 Graham扫描算法 | 卷包裹算法)

Guarding Bananas Once there was a lazy monkey in a forest. But he loved banana too much. One day there was a storm in the jungle and all the bananas...

2019-09-11 19:50:13 58 0

原创 POJ - 3348 Cows (凸包 求多边形面积 Graham扫描算法)

Cows Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, t...

2019-09-10 16:30:46 43 0

原创 POJ - 1113 Wall (凸包 Graham扫描算法 | 卷包裹算法)

Wall Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greed...

2019-09-09 20:55:59 31 0

原创 POJ - 2007 Scrambled Polygon (凸包 极角排序)

Scrambled Polygon A closed polygon is a figure bounded by a finite number of line segments. The intersections of the bounding line segments are ca...

2019-09-09 20:42:18 26 0

原创 The Preliminary Contest for ICPC Asia Xuzhou 2019 D. Carneginon (KMP)

D. Carneginon 题目链接:https://nanti.jisuanke.com/t/41386 题目大意:给一个母串T,接下来给n个串S,如果S的长度与T的长度相等:如果S与T串相同,输出:jntm!,否则输出:friend!, 如果S的长度比T小,如果S是T的子串,输出:my c...

2019-09-07 20:04:31 24 0

原创 Gym - 102222G Factories (树形DP)

Factories Byteland hasnncities numbered from11tonn, andn−1n−1bi-directional roads connecting them. For each pair of cities, the residents can arri...

2019-09-05 17:35:22 144 0

原创 POJ - 2411 Mondriaan's Dream (状压DP)

Mondriaan's Dream Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his &...

2019-08-22 10:19:52 47 0

原创 HDU - 4272 LianLianKan (状压DP)

LianLianKan I like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game is a...

2019-08-21 10:05:38 56 0

原创 HDU - 1438 钥匙计数之一 (状压DP)

钥匙计数之一 一把锁匙有N个槽,槽深为1,2,3,4。每锁匙至少有3个不同的深度且至少有1对相连的槽其深度之差为3。求这样的锁匙的总数。 Input 本题无输入 Output 对N>=2且N<=31,输出满足要求的锁匙的总数。 Sample Output N=2: ...

2019-08-20 18:02:14 32 0

原创 POJ - 1226 Substrings (后缀数组 出现或反转后出现在每个字符串中的最长公共子串)

Substrings You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its invers...

2019-08-20 09:17:57 37 0

原创 SPOJ - PHRASES Relevant Phrases of Annihilation (后缀数组 至少出现两次且不重叠的最长公共子串)

Relevant Phrases of Annihilation You are the King of Byteland. Your agents have just intercepted a batch of encrypted enemy messages concerning th...

2019-08-20 08:49:49 25 0

原创 POJ - 3294 Life Forms (后缀数组 多串至少出现在k个串中的最长公共子串)

Life Forms You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wri...

2019-08-19 10:12:51 27 0

原创 POJ - 3080 Blue Jeans (后缀数组 多串最大公共子串)

Blue Jeans The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds o...

2019-08-19 09:28:37 32 0

原创 SPOJ - REPEATS Repeats (后缀数组 + RMQ 重复次数最多的连续重复子串的重复次数)

Repeats A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, ...

2019-08-17 17:55:56 80 0

原创 CSU - 1632 Repeated Substrings (后缀数组 至少出现两次的子串个数)

Repeated Substrings String analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One i...

2019-08-17 17:37:22 30 0

原创 POJ - 2406 Power Strings (后缀数组 最大重复次数)

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 ...

2019-08-17 15:21:55 37 0

原创 POJ - 3450 Corporate Identity (后缀数组 多串最大公共子串)

Corporate Identity Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also ot...

2019-08-16 11:43:12 49 0

原创 POJ - 3261 Milk Patterns (后缀数组 最长可重叠重复k次子串 + 二分)

Milk Patterns Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered t...

2019-08-15 17:13:05 29 0

原创 POJ - 1743 Musical Theme (后缀数组 最长不重叠重复子串 +二分)

Musical Theme A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing ...

2019-08-15 16:48:01 27 0

原创 POJ - 2774 Long Long Message (后缀数组 最长公共子串)

Long Long Message The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is ge...

2019-08-15 15:45:41 35 0

提示
确定要删除当前文章?
取消 删除