摘要: /* * hdu1787/win.cpp * Created on: 2012-7-9 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#include <map>#include &l 阅读全文
posted @ 2012-07-09 19:45 moonbay 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 这题不错,开始看题目,以为是道水题,花几分钟打了个暴搜,果断runtime error,栈溢出。于是马上找规律,发现可以转换成矩阵乘法和快速幂解决,不过由于审题不清,搞错了a0...a9的顺序,调了老半天才发现。。。。/* * hdu1757/win.cpp * Created on: 2012-7-9 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>#include &l 阅读全文
posted @ 2012-07-09 19:11 moonbay 阅读(161) 评论(0) 推荐(0) 编辑