会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Faircoala
博客园
首页
新随笔
联系
管理
订阅
01 2011 档案
POJ-1009-"Edge Detection"
摘要:只需考虑原图中数值变化的点,其他点的编码与其左侧的点相同。最开始用brute force,优化了输出编码中有连续0的情况,sample input可以较快通过,但提交结果超时。又换成上面的方法,可以AC,但代码改得很乱,待重写。
阅读全文
posted @
2011-01-31 18:36
Faircoala
阅读(2645)
评论(2)
推荐(0)
POJ-1008-"Maya Calendar"
摘要:#include #include static char *Haab_months[] = { "pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "
阅读全文
posted @
2011-01-31 12:49
Faircoala
阅读(194)
评论(0)
推荐(0)
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
阅读(150)
评论(0)
推荐(0)
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
阅读(149)
评论(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
阅读(178)
评论(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
阅读(113)
评论(0)
推荐(0)
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
阅读(138)
评论(0)
推荐(0)
POJ-1002-"487-3279"
摘要:将号码统一表示成int型,利用数组存储,排序,遍历排序后的结果找出有副本的号码。最初尝试使用链表,但运行超时,可能是测试数据中有大量无副本的号码,导致频繁的malloc消耗了过多时间。可以AC的代码:超时的代码:
阅读全文
posted @
2011-01-28 22:28
Faircoala
阅读(314)
评论(0)
推荐(0)
POJ-1001-Exponentiation
摘要:求实数的幂R^n,可以转化成求整数幂,结果中的小数点位置为R的小数位数*n,输出结果时在相应位置输出一个'.'即可。计算整数幂用大数乘法。
阅读全文
posted @
2011-01-28 16:09
Faircoala
阅读(1298)
评论(0)
推荐(0)
公告