2012年3月16日

Integer Inquiry

摘要: 高精度加法,不知错在哪里。、 1 # include <stdio.h> 2 # include <string.h> 3 4 # define MAXN 110 5 6 char s[MAXN], sum[MAXN]; 7 8 int main() 9 {10 int i, len, c, tmp;11 char ch;12 13 while (scanf("%s", s) == 1)14 {15 len = strlen(s);16 17 if (len == 1 && s[0] == ... 阅读全文

posted @ 2012-03-16 23:40 getgoing 阅读(324) 评论(0) 推荐(0) 编辑

Artificial Intelligence

摘要: 读取题目要求格式的字符串是个问题。 1 /* UVa 537 - Artificial Intelligence? */ 2 # include <stdio.h> 3 # include <ctype.h> 4 # include <stdlib.h> 5 6 typedef struct { 7 double val; 8 int vis; 9 }phy;10 11 phy U, I, P, x;12 int T;13 char tmp[50];14 15 void getval(void);16 17 int main()18 {19 int i... 阅读全文

posted @ 2012-03-16 13:23 getgoing 阅读(271) 评论(0) 推荐(0) 编辑

csu 1148 词典

摘要: 快排、二分查找,对于我来说是道好题,对大牛来说,瞄一眼就跳过了。。。 1 # include <stdio.h> 2 # include <string.h> 3 # include <stdlib.h> 4 5 # define MAXN 100005 6 7 typedef struct { 8 char s[12]; 9 char ss[12];10 } word;11 12 word dic[MAXN];13 word key;14 15 int cmp(const void *a, const void *b)16 { 17 return... 阅读全文

posted @ 2012-03-16 00:23 getgoing 阅读(253) 评论(0) 推荐(0) 编辑

导航