摘要: #include #include char s[128] = {0};char stack[128] = {0};int stackFloorNum = 0;void push(char a){ stackFloorNum++; stack[stackFloorNum-1] = a; return; }void pop(){ stack[stackFloorNum-1] = 0; stackFloorNum--; return; }int match(char a, char b){ if((a== '(' && b == ')') || (a 阅读全文
posted @ 2014-01-23 10:43 reasontom 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 char tortName[200][80] = {{0}}; 5 char tortSort[200][80] = {{0}}; 6 7 int find(int x) 8 { 9 int i = 0;10 11 for(i = 0; i p1)52 {53 firstMove = tortNum-1-j;54 break;55 }56 p1 = p2;57 ... 阅读全文
posted @ 2014-01-23 09:12 reasontom 阅读(224) 评论(0) 推荐(0) 编辑
摘要: #include #include #include double start,finish;int check(int m, int k){ int remainder = 0; int position = 0; int count = 0; for(count = 2 * k; count != k; count--) { remainder = m % count; position = (remainder + position + 1) % count; if(position <= k) ... 阅读全文
posted @ 2014-01-21 17:58 reasontom 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 #define BOOLEAN int 5 #define TRUE 1 6 #define FALSE 0 7 8 #define MAX 52 9 #define INPUT_COUNT_EACH_LINE 26 10 11 typedef struct tagPile 12 { 13 char rank[MAX]; 14 char suit[MAX]; 15 int cardCount; 16 }Pile; 17 18 Pile pile[MAX] = {{0}}; 1... 阅读全文
posted @ 2014-01-21 17:47 reasontom 阅读(270) 评论(0) 推荐(0) 编辑