摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=20333#problem/A 阅读全文
posted @ 2013-05-09 23:39 zhang1107 阅读(135) 评论(0) 推荐(0) 编辑
摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3975View Code 阅读全文
posted @ 2013-05-09 23:03 zhang1107 阅读(157) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1837有dp[floor]=sum{dp[floor+i]/6}+1 (1<=i<=6) 可以列出方程,方向分up和down讨论View Code 阅读全文
posted @ 2013-05-09 20:26 zhang1107 阅读(139) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4712View Code int N,M;//注意题目说x为正整数,0不算int Extend_euc(int a,int b,int&x,int&y) { if(b==0) {x=1,y=0;return a;} int d=Extend_euc(b,a%b,x,y); int tmp=x; x=y; y=tmp-(a/b)*y; return d;}void modeq(int a,int b,int n) { int e,i,d,x,y,t... 阅读全文
posted @ 2013-05-09 13:05 zhang1107 阅读(119) 评论(0) 推荐(0) 编辑