会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Faircoala
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
2011年1月30日
POJ-1007-"DNA Sorting"
摘要: #include typedef struct _Node { char seq[100]; int cnt; } Node; int count(char *str, int l, int r); void sort(Node *list, int n); int main() { int i,n,len; Node list[100]; scanf("%d%d", &...
阅读全文
posted @ 2011-01-30 01:38 Faircoala
阅读(144)
评论(0)
推荐(0)
编辑
2011年1月29日
POJ-1006-Biorhythms
摘要: /* * p+23*t1 * = e+28*t2 * = i+33*t3 */ #include #define CANDIV(a,b) ((a) % (b) == 0) int main() { int p,e,i,d,v,c; c=1; while(scanf("%d%d%d%d", &p, &e, &i, &d) != EOF) { if(p...
阅读全文
posted @ 2011-01-29 13:11 Faircoala
阅读(144)
评论(0)
推荐(0)
编辑
POJ-1005-"I Think I Need a Houseboat"
摘要: #include #define PI 3.1415926 int main() { int i,n,t; float x,y; scanf("%d", &n); for(i=0; i<n; i++) { scanf("%f%f", &x, &y); t = (int)(PI*(x*x + y*y) / 100); t++; printf("Proper...
阅读全文
posted @ 2011-01-29 12:35 Faircoala
阅读(168)
评论(0)
推荐(0)
编辑
POJ-1004-"Financial Management"
摘要: #include int main() { float month,total; int i; total = 0.0; for(i=0; i<12; i++) { scanf("%f", &month); total += month; } total /= 12; printf("$%.2f\n", total); return 0; }
阅读全文
posted @ 2011-01-29 11:41 Faircoala
阅读(108)
评论(0)
推荐(0)
编辑
2011年1月28日
POJ-1003-Hangover
摘要: #include int main() { double real,t; int n; char str[10]; while(scanf("%s",str)) { if(!strcmp("0.00",str)) break; t = 0.0; n = 2; real = str[0]-'0' + 0.1 * (str[2]-'0') + 0...
阅读全文
posted @ 2011-01-28 22:49 Faircoala
阅读(132)
评论(0)
推荐(0)
编辑
POJ-1002-"487-3279"
摘要: 将号码统一表示成int型,利用数组存储,排序,遍历排序后的结果找出有副本的号码。最初尝试使用链表,但运行超时,可能是测试数据中有大量无副本的号码,导致频繁的malloc消耗了过多时间。可以AC的代码:超时的代码:
阅读全文
posted @ 2011-01-28 22:28 Faircoala
阅读(308)
评论(0)
推荐(0)
编辑
POJ-1001-Exponentiation
摘要: 求实数的幂R^n,可以转化成求整数幂,结果中的小数点位置为R的小数位数*n,输出结果时在相应位置输出一个'.'即可。计算整数幂用大数乘法。
阅读全文
posted @ 2011-01-28 16:09 Faircoala
阅读(1289)
评论(0)
推荐(0)
编辑
2010年10月10日
虎书chap01编程练习
摘要: main.c:[代码]试试SyntaxHighlighter效果:
阅读全文
posted @ 2010-10-10 23:50 Faircoala
阅读(619)
评论(1)
推荐(0)
编辑
上一页
1
2
公告