因为痛,所以叫青春

我有一个梦想:穷屌丝变身富屌丝

2012年8月2日

uva10112 Myacm Triangles

摘要: 题目已经给出来了公式,求面积的,不过也可以在百度上找到其他的求面积公式,只是想要寻找内部和边缘都没有点的三角形,我刚开始没想到很好的办法,后来看到一位前辈的方法,确实很简单的就能理解了,只是让自己想的话,就算是费上半天的劲,也想不到好的办法View Code #include#includedoub... 阅读全文

posted @ 2012-08-02 20:26 Nice! 阅读(268) 评论(0) 推荐(0) 编辑
USACO第三道题

摘要: View Code Friday the ThirteenthIs Friday the 13th really an unusual event? That is, does the 13th of the month land on a Friday less often than on any... 阅读全文

posted @ 2012-08-02 16:17 Nice! 阅读(209) 评论(0) 推荐(0) 编辑
uva579 ClockHands

摘要: 错的很狗血View Code #include#includeint main(){ double m, n, t; char ch; while(scanf("%lf%c%lf",&m,&ch,&n) && (m||n)) { if(n == 0) ... 阅读全文

posted @ 2012-08-02 11:20 Nice! 阅读(124) 评论(0) 推荐(0) 编辑
uva10879 Code Refactoring

摘要: AC如此简单,只要用心做,没什么不可以View Code #includeint main(){ int T, k, f[4], top, j; scanf("%d",&T); for(int i = 0;i < T; i++) { top = 0; ... 阅读全文

posted @ 2012-08-02 10:11 Nice! 阅读(162) 评论(0) 推荐(0) 编辑
uvaUVa 10392 - Factoring Large Numbers

摘要: 简单,读题加AC用了很短的时间,我自己单独把题目意思揣摩出来的,呵呵View Code #include#includeint main(){ long long f[50000], n, i, k, m; k = 0; for(n = 2;k sqrt(n)) ... 阅读全文

posted @ 2012-08-02 09:47 Nice! 阅读(226) 评论(0) 推荐(0) 编辑
USACO第二道题

摘要: View Code Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or ... 阅读全文

posted @ 2012-08-02 08:52 Nice! 阅读(216) 评论(0) 推荐(0) 编辑
USACO第一道题目

摘要: View Code Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here ... 阅读全文

posted @ 2012-08-02 08:51 Nice! 阅读(156) 评论(0) 推荐(0) 编辑