#include <stdio.h> #include <string.h> #define M 1002 char map[M][220] = {"0","1","1"}; void add(char *aStr, char *bStr, char *cStr)//aStr + bStr = cStr { int ai = strlen(aStr)-1,bi = strlen(bStr)-1,ci = 0; int all,over = 0; for(; ai>=0 || bi>=0; ai--,bi--) { all = (ai>=0 ? aStr[ai]-'0' : 0) + (bi>=0 ? bStr[bi]-'0' : 0) + over; cStr[ci++] = all % 10 + '0'; over = all / 10; } if(over > 0) cStr[ci++] = over + '0'; cStr[ci] = '