https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4675
题意:
二维平面内给出若干矩形,平面被矩形的边分为若干个区域,求一共有多少区域。
分析:
由于矩形只有50个,离散化后的平面大约是100*100的。不妨对于每个矩形覆盖...
分类:
其他好文 时间:
2014-09-26 02:36:08
阅读次数:
198
题目链接 https://icpcarchive.ecs.baylor.edu/external/65/6514.pdf题意:给出n个数(n a[max(i,j)]) swap(a[i], a[j]) ;}//Carlos's Codewhile (!sorted(a)) { int i...
分类:
其他好文 时间:
2014-09-25 21:45:07
阅读次数:
244
UVALive - 5908(UVA1517)Tracking RFIDs(暴力)
题目链接
题目大意:给你S个传感器,然后每个传感器的感应半径是R,有W堵墙,已经传感器的感应范围会因为碰到一堵墙而减少1,那么如果这个感应器和某个物品中间有N堵墙的话,感应范围就变为R - N。给你P个物品,要求你求出每个物品可以被哪些感应器感应到。
解题思路:因为这题的S很大,P比较小,而且传感...
分类:
其他好文 时间:
2014-09-24 13:38:16
阅读次数:
246
UVALive 3942 - Remember the Word(DP,数组Trie+指针Trie)
ACM
题目地址:
UVALive 3942 - Remember the Word
题意:
给一些单词,然后给一个长的单词,问有几种方法能组成这个大单词,单词可以重复用。
分析:
DP[i]=sum{DP[j} (i,从后往前求。
本来用数组Trie写得爽...
分类:
其他好文 时间:
2014-09-23 23:03:45
阅读次数:
242
UVALive - 3263 That Nice Euler Circuit (几何)
ACM
题目地址:
UVALive - 3263 That Nice Euler Circuit
题意:
给出一个点,问连起来后的图形把平面分为几个区域。
分析:
欧拉定理有:设平面图的顶点数、边数、面数分别V,E,F则V+F-E=2
大白的题目,做起来还是很有技巧的。
...
分类:
其他好文 时间:
2014-09-19 21:11:36
阅读次数:
227
Day by day number of Kangaroos is decreasing just like
tiger, whale or lions. So I decided to make them a sanctuary
where they will live peacefully. I do not let visitors go
near them. So I planted...
分类:
其他好文 时间:
2014-09-19 03:26:24
阅读次数:
278
链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4582
题意:有n门课程,每个课程有个开始时间和结束时间,和参加人数,现要租借教室来上课。再告诉你一个矩阵,a[i][j]表示第j门课如果在第i门课后使用第i门课的教室,需要a[i][...
分类:
其他好文 时间:
2014-09-17 02:24:11
阅读次数:
268
DescriptionBeijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, and finally ...
分类:
其他好文 时间:
2014-09-12 20:30:24
阅读次数:
184