作者注
图片来自
题目大意
给出一张位图,是太阳和周围的光芒,像这样:
问有多少个太阳,并统计每个太阳周围的光线数量,排序后输出。
图的规模是1600*1600,光线的宽度[……]
渺渺苍天,星光烁烁,美丽家园球外乡
这道题的解法实际上非常简单:http://codeforces.com/contest/329/submission/4122927
这道题要求我们证明一大堆东西(下面的证明超过80行)。
假设n>=4.显然nC,C->B,A->D,D->A。这里,点的配对是显然的,A和D配对,同样B和C配对。
首先,如果A+D为空或B+C为空,我们就一定能得到上述上界。我们可以简单地交替选择剩下两个配对区域中的点。因此我们假设A+D非空,B+C也非空。
首先,我们讨论B和C之间的关系(A和D同样符合
这一关系)。(译者注:原文为‘A和B’,疑为作者笔误)
定理1:
|B-C|[......]
先给出ydc的题解地址:
http://ydc.blog.uoj.ac/blog/336
#include #include #include #include #include using namespace std; typedef[......]
Smart Beaver recently got interested in a new word game. The point is as follows: count the number of distinct good substrings of some string
s. To determine if a string is good or not the game uses rules. Overall there are
n rules. Each rule is described by a group of three
(p, l, r), where [……]