2013年9月16日

uva 11728 Alternate Task

摘要: 解题思路:将 1~1000 的因子和打表(类似素数筛法) 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uva 11728 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #include 8 #include 9 #include 10 #includ... 阅读全文

posted @ 2013-09-16 23:02 SCNU20102200088 阅读(264) 评论(0) 推荐(0) 编辑

uva 10673 Play with Floor and Ceil

摘要: 解题思路:扩展 gcd 或者 直接判断 x%k 是否等于 0, 若是,可取 p=0, q=k; 否则,可取 p=-x, q=x. 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uva 10673 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #includ.. 阅读全文

posted @ 2013-09-16 22:23 SCNU20102200088 阅读(257) 评论(0) 推荐(0) 编辑

uvalive 5009 Error Curves

摘要: 解题思路:三分 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uvalive 5009 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #include 8 #include 9 #include 10 #include 11 #i... 阅读全文

posted @ 2013-09-16 21:21 SCNU20102200088 阅读(241) 评论(0) 推荐(0) 编辑

uva 10341 Solve It

摘要: 解题思路:二分 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uva 10341 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #inc... 阅读全文

posted @ 2013-09-16 20:50 SCNU20102200088 阅读(144) 评论(0) 推荐(0) 编辑

uva 10870 Recurrences

摘要: 解题思路:矩阵快速幂 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uva 10870 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #include 8 #include 9 #include 10 #include 11 #i... 阅读全文

posted @ 2013-09-16 20:31 SCNU20102200088 阅读(246) 评论(0) 推荐(0) 编辑

uva 11021 Tribbles

摘要: 解题思路:设一开始只有 1 只麻雀,i 天后全部死亡的概率为 f(i). 则有:f(0)=0, f(1)=p0, f(i)=p0+ p1· f(i-1)+p2· f(i-1)2+··· + pn-1· f(i-1)n-1 . 则本题答案为 f(m)k . 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: uva 11021 3 //user_id: SCNU20102200088 4 /////// 阅读全文

posted @ 2013-09-16 19:48 SCNU20102200088 阅读(164) 评论(0) 推荐(0) 编辑

hdoj 2844 Coins

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2844解题思路:背包 1 /////////////////////////////////////////////////////////////////////////// 2 //problem_id: hdoj 2844 3 //user_id: SCNU20102200088 4 /////////////////////////////////////////////////////////////////////////// 5 6 #include 7 #include 8 #... 阅读全文

posted @ 2013-09-16 00:25 SCNU20102200088 阅读(164) 评论(0) 推荐(0) 编辑

导航