水题,就是把非常大的数组进行相加#include <iostream>#include <algorithm>#include <cstring>using namespace std;char table_atoi[128];//下标字母 对应 数字int main(){ int i =0; char c = '0'; for( ; i < 10 ; ++i ,++c) { table_atoi[c] = i; } char buff[100]; char result[100] = {0}; char carry = 0; int Read More
posted @ 2012-06-25 22:51 godjob Views(191) Comments(0) Diggs(0) Edit
该题有ANSI C写了一遍,通过使用二叉树的思想可以很好的解决这个问题,该题是用UVa系统测评的,发现如果用标准的C写代码的话,语法要求真的很严格,提交了几次都是语法错误,单行注释都报错,最要紧的是连内建的bool类型都没有,所以我用int型代替,下面是AC的代码#include <stdio.h>#define Nil -1char left[50], right[50], tree_index[50];char code[40];int top = 0;int tree_root = -1;char* out_buff_is = "Set %d is immediat Read More
posted @ 2012-06-25 17:20 godjob Views(222) Comments(0) Diggs(0) Edit