因为痛,所以叫青春

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

2012年7月31日

uva568 Just the Facts

摘要: View Code #include#includeint main(){ int n, i, j, k; long long s = 0; while(scanf("%d",&n) != EOF) { printf("%5d -> ", n); ... 阅读全文

posted @ 2012-07-31 21:29 Nice! 阅读(161) 评论(0) 推荐(0) 编辑
uva408 Uniform Generator

摘要: View Code #include#include#includeint main(){ int m, n, k; while(scanf("%d%d",&m,&n) == 2) { printf("%10d%10d",m,n); if(m < n){... 阅读全文

posted @ 2012-07-31 21:11 Nice! 阅读(219) 评论(0) 推荐(0) 编辑
uva10110 Light, more light

摘要: View Code #include#include#includeint main(){ unsigned int n, k; while(scanf("%d",&n) && n) { k = floor(sqrt((double)n)); if(k*... 阅读全文

posted @ 2012-07-31 19:07 Nice! 阅读(202) 评论(0) 推荐(0) 编辑
KMP算法

摘要: View Code #include#includeconst int N = 10010;char T[1000010], P[N];int pi[N];int ans;void COMPUTER_PREFIX_FUNCTION(){ int m = strlen(P), i, k;... 阅读全文

posted @ 2012-07-31 18:21 Nice! 阅读(145) 评论(0) 推荐(0) 编辑