- 博客(25)
- 资源 (1)
- 收藏
- 关注
原创 迷宫城堡(Tarjan)
迷宫城堡 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18281 Accepted Submission(s): 8033Problem Description 为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个
2017-10-31 10:31:35 703
原创 B - Network(割点)
求割点的个数: 割点:在无向连通图中,如果将其中一个点及所连接该点的边去掉,图就不再连接,此点为割点。 A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N
2017-10-28 17:05:56 525
原创 小程序的积累2
<!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>认识html文件基本结构</title> <style type = "text/css"> h1{
2017-10-27 16:31:41 328
原创 小程序的积累1
<!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>标签的语法</title> <style type = "text/css"> h1{ font-size:50px;
2017-10-27 16:26:15 353
原创 A - Network of Schools POJ - 1236(Tarjan)
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 “receiving sc
2017-10-25 09:50:46 361
原创 CodeForces - 548A (字符串)
While Mike was walking in the subway, all the stuff in his back-bag dropped on the ground. There were several fax messages among them. He concatenated these strings in some order and now he has string
2017-10-25 08:09:44 480
原创 CodeForces - 548B(补题)
Mike and some bears are playing a game just for fun. Mike is the judge. All bears except Mike are standing in an n × m grid, there's exactly one bear in each cell. We denote the bear standing in column
2017-10-24 09:51:35 517
原创 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
2017-10-19 22:01:21 417
原创 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
2017-10-19 21:30:38 366
原创 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
2017-10-13 14:54:37 606
原创 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
2017-10-13 11:41:19 338
原创 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 <
2017-10-13 10:44:30 529
原创 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
2017-10-13 10:22:24 484
原创 C - 剪花布条(KMP(出现次数无重复))
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Output
2017-10-13 09:51:32 285
原创 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
2017-10-13 09:41:53 504
原创 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)
2017-10-13 08:55:34 480 2
原创 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
2017-10-12 21:31:45 302
原创 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
2017-10-12 20:54:41 361
原创 文章标题
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
2017-10-12 20:43:58 216
原创 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,
2017-10-12 19:55:06 702
原创 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
2017-10-11 21:46:36 513
原创 F - Rain on your Parade(Hopcroft-Carp)
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
2017-10-11 20:57:40 364
原创 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
2017-10-09 20:25:22 388
原创 D - 棋盘游戏(匈牙利算法)
小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些格子上
2017-10-09 17:17:30 429
原创 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
2017-10-09 15:53:36 1085
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人