题 There are 2N white balls on a table in two rows, making a nice 2-by-N rectangle. Jon has a big paint bucketfull of black paint. (Don’t ask why.) He
分类:
其他好文 时间:
2016-02-12 06:05:04
阅读次数:
305
题 Andrea is a famous science fiction writer, who runs masterclasses for her beloved readers. The most popular one is the Alien Communication Mastercla
分类:
其他好文 时间:
2016-02-05 19:01:19
阅读次数:
143
题 Shi realized that he was almost out of money, even renting Shitalian lands. Shi was walking on a street, while thinking of a way to recover his fort
分类:
其他好文 时间:
2016-02-05 18:56:33
阅读次数:
188
F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ...
分类:
其他好文 时间:
2016-01-16 22:26:53
阅读次数:
265
好长时间前做的题,来补一下题解。给出括号化的序列,每次改变一个括号方向,求出下标p,是的改变p处的括号方向可以使括号化仍然成立,且p最小。保证括号化看似和线段树没有联系,我们可以把括号"("表示为1,把括号")"表示为-1,则保证括号化的充要条件就是使数字序列前缀和始终大于等于零用线段树维护前缀和查...
分类:
其他好文 时间:
2015-12-02 22:18:42
阅读次数:
145
题目链接 :http://codeforces.com/gym/100781/attachments题意 :有n个编号为0-n-1的点, 给出目前已经有的边(最多n-1条), 问如何添加最少的边, 使得整个图连通, 且其中两点间距离的最大值最小, 一条边距离为1单位思路 :两点间距离的情况 : 1....
分类:
Web程序 时间:
2015-10-19 12:17:23
阅读次数:
292
题目:Even though he is the head of the Shitalian Mafia, Shi doesn't like bloodshed and punishes his subordinates if they kill innocent people. That is w...
分类:
其他好文 时间:
2015-09-14 15:29:21
阅读次数:
163
题目:It is late at night and you found a logical expression on the blackboard, which you believe is the secret to figure out if your gang is going to be...
分类:
其他好文 时间:
2015-09-14 15:27:21
阅读次数:
138
题意:给你一幅图,问有多少条路径使得去掉该条路后最短路发生变化。思路:先起始两点求两遍单源最短路,利用s[u] + t[v] + G[u][v] = dis 找出所有最短路径,构造新图。在新图中找到所有的桥输出就可以了。 1 #include 2 #include 3 #include ...
分类:
其他好文 时间:
2015-09-12 06:17:00
阅读次数:
184
题目:After suddenly becoming a billionaire, Shi adopted YOLO as his motto and decided to buy a small european island, which he named Shitalia. Many peop...
分类:
其他好文 时间:
2015-09-11 23:19:37
阅读次数:
186