# K - Count the string（KMP寻找子串个数）

It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: “a...

# J - Simpsons’ Hidden Talents （找前面的串的前缀又是后面串的后缀）

Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I want to find out if I have a talent in p...

# H - Seek the Name, Seek the Fame（KMP匹配前缀+后缀）

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

# G - Power Strings（KMP最小循环节出现的次数）

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

# E - Period(KMP求循环节的位置以及出现的次数)

For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2 <...

# D - Cyclic Nacklace（求可以构成循环的最少补充的字符）

CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to...

# B - Oulipo（KMP(有重复次数)）

The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’aff...

# L - Cat VS Dog(匈牙利)

include include include include include using namespace std; char a[121][121]; char b[121][121]; int g[121][121]; bool vis[121]; int linker[121]; int ans, n; bool DFS(int u)...

# K - Treasure Exploration（匈牙利+Floyd）

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

# J - Air Raid（Hopcroft-Carp）

Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town’s streets you can...

# 文章标题

Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defend a medieval...

# H - 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 a new,...

# G - Oil Skimming（匈牙利）

Thanks to a certain “green” resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the Gulf of Mexico just waiting to be scooped up by en...

You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a soothing wind sends fresh, salty air from the sea. The...

# E - Swap(匈牙利)

Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal entries equal to 1? Input There are several test ca...

# A - Fire Net (dfs)

Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castle that...

Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedu...

# I - Tunnel Warfare(线段树，区间合并)

During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except th...

297条 共15页1 2 3 4 5 ... 下一页 尾页
个人资料
• 访问：26554次
• 积分：3048
• 等级：
• 排名：第12192名
• 原创：293篇
• 转载：2篇
• 译文：2篇
• 评论：5条