zswx

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

08 2011 档案

摘要:C. Bunstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLavrenty, a baker, is going to make several buns with stuffings and sell them.Lavrenty has n grams of dough as well as m different stuffing types. The stuffing types are numerated from 1 to m 阅读全文
posted @ 2011-08-20 12:18 zswx 阅读(387) 评论(0) 推荐(0)

摘要:刚开始,没什么思路,后来才知道要用到polya定理,本来还以为是一道排列问题,最后却变成了一道群的轮换问题,最后由于数据非常大,又要mod除法运算,因此要求乘法逆元。polya定理 参考:http://www.docin.com/p-43391964.html http://www.cppblog.com/sdfond/archive/2010/02/06/107403.aspx http://hi.baidu.com/lewutian/blog/item/c75dff06c4693f6a03088100.htmlmod除法运算:http://wenku.baidu.com/view/6f28 阅读全文
posted @ 2011-08-15 13:04 zswx 阅读(404) 评论(0) 推荐(0)

摘要:最近在学习一些图论的基本算法,上网查了下深搜,发现了这个网址写的不错:http://iprai.hust.edu.cn/icl2002/algorithm/algorithm/commonalg/graph/traversal/dfs.htm 阅读全文
posted @ 2011-08-07 22:05 zswx 阅读(190) 评论(0) 推荐(0)