摘要: 很简单的几何题。直接硬搞即可。

  阅读全文
posted @ 2007-09-15 20:25 Felicia 阅读(377) | 评论 (0)编辑 收藏
 
     摘要: Winsock入门

  阅读全文
posted @ 2007-09-14 22:26 Felicia 阅读(189) | 评论 (0)编辑 收藏
 
     摘要: Winsock入门

  阅读全文
posted @ 2007-09-14 22:23 Felicia 阅读(166) | 评论 (0)编辑 收藏
 
     摘要: 见内

  阅读全文
posted @ 2007-09-14 22:21 Felicia 阅读(527) | 评论 (0)编辑 收藏
 
     摘要: 又是一个求多边形的核的题。

  阅读全文
posted @ 2007-09-14 22:18 Felicia 阅读(479) | 评论 (0)编辑 收藏
 
     摘要: :)

  阅读全文
posted @ 2007-09-13 14:17 Felicia 阅读(233) | 评论 (2)编辑 收藏
 
     摘要: 先求凸包,然后再用旋转卡壳方法求解。
具体做法是枚举三角形的第一个点i,设j = i + 1,k = j + 1。然后做以下操作:
1.计算i,j,k构成的三角形面积a1和i,j,k + 1构成的三角形面积a2,如果a2 < a1,则进行下一步,否则k++,重复此步。
2.记录此时的三角形面积b,如果b < preb(就是上一个j对应的三角形面积)j++,转第一步,否则退出。
可以证明这个算法的复杂度为O(n2)。具体实现见代码。

  阅读全文
posted @ 2007-09-13 13:40 Felicia 阅读(841) | 评论 (0)编辑 收藏
 
     摘要: 经典的状态压缩DP,《算法艺术与信息学竞赛》的例题。f[i][j]表示前i行,最后两行状态为二进制数j,嵌入的最多芯片数。第i行到第i+1行用DFS进行状态转移。
由于第i+1行只和第i行有关,故可以用滚动数组优化。

  阅读全文
posted @ 2007-09-12 20:44 Felicia 阅读(1485) | 评论 (3)编辑 收藏
 
     摘要: A O(NM) dynamic programming algorithm is quite apparent after sorting the computers and network interfaces by their coordinates. Furthermore, in any optimized case, for each computer the difference between the the indices of the network interfaces matching to and closest to the computer is never larger than N. So the complexity could be reduced to O(N2)

有很多细节不好考虑,应该是我的水平原因。最后我向updog要了数据才过的。而且代码写的不好。将就看一下吧。

  阅读全文
posted @ 2007-09-11 22:28 Felicia 阅读(781) | 评论 (1)编辑 收藏
 
     摘要: 其实是初等几何题。在纸上画一下就出来了。

  阅读全文
posted @ 2007-09-10 20:48 Felicia 阅读(402) | 评论 (0)编辑 收藏
仅列出标题
共15页: First 5 6 7 8 9 10 11 12 13 Last