2012年2月19日

UVaOj 494 Kindergarten Counting Game

摘要: 复习了the C programming language 中的单词记数/*494 - Kindergarten Counting Game*/# include <stdio.h># include <ctype.h># define IN 1# define OUT 0int main(){ int ans,state; char ch; ans = 0; state = OUT; while ((ch=getchar()) != EOF) { if (!isalpha(ch) && ch!='\n') state =... 阅读全文

posted @ 2012-02-19 13:39 getgoing 阅读(312) 评论(0) 推荐(0) 编辑

UVaOJ458 - The Decoder

摘要: 看出来了,ascll -7WA:/*458 - The Decoder*/# include <stdio.h>int main(){ char ch; while ((ch=getchar()) != EOF) if (ch != '\n') putchar((ch+121)%128); else putchar('\n'); return 0;}AC:/*458 - The Decoder*/# include <stdio.h>int main(){ char ch; while ((ch=getchar()) != EOF) .. 阅读全文

posted @ 2012-02-19 12:35 getgoing 阅读(315) 评论(0) 推荐(0) 编辑

UVaOJ 10300 Ecological Premium

摘要: 理解错误:Do not output any blank lines.注意: No integer in the input is greater than 100000 or less than 0./*10300 - Ecological Premium*/# include <stdio.h>int main(){ int n, f; long long s, a, e, ans; scanf("%d", &n); while (n > 0) { ans = 0; scanf("%d", &f); while (. 阅读全文

posted @ 2012-02-19 11:18 getgoing 阅读(316) 评论(0) 推荐(0) 编辑

UVaOJ10071 - Back to High School Physics

摘要: 初速度与加速度恒定,已知经 t 时间后速度为 v, 求经 2t 后位移为多少?/*10071 - Back to High School Physics*/# include <stdio.h>int main(){ int v0, t; while (scanf("%d%d", &v0, &t)!=EOF) printf("%d\n",2*v0*t); return 0;} 阅读全文

posted @ 2012-02-19 10:34 getgoing 阅读(273) 评论(0) 推荐(0) 编辑

UvaOJ10055 hashmat the brave warrior

摘要: 3WA。。。/* UVa10055 Hashmat */# include <stdio.h>int main(){ unsigned long a, b; while (scanf("%ld%ld", &a, &b) != EOF) printf("%ld\n", (a<b ? b-a:a-b)); return 0;} 阅读全文

posted @ 2012-02-19 10:10 getgoing 阅读(369) 评论(0) 推荐(0) 编辑

poj 1753 flip game

摘要: 直接枚举//2011-11-1#include <iostream>#include <cstdio>using namespace std;void Replace(char a[], int b[]);int Search(int a[]);bool Judge(int a[]);void Flip(int b[], int k);int main(){ char a[16], c; int b[16]; int i = 0; while ((c = getchar()) != EOF && i < 16) if (c == 'b 阅读全文

posted @ 2012-02-19 00:11 getgoing 阅读(204) 评论(0) 推荐(0) 编辑

导航