映射在編程中的應(yīng)用
摘要:
1.題目:判斷斷一個(gè)由a-z這26個(gè)字符組成的字符串中哪個(gè)字符出現(xiàn)的次數(shù)最多。#include<stdio.h>#include "string.h"int main(){ int n, Case[26], j, max; char str[1001]; scanf("%d", &n); for(int i=0; i<n; i++) { scanf("%s", str); memset(Case, 0, sizeof(Case)); for(j=0; j<strlen(str); j++) Case[s 閱讀全文
posted @ 2011-09-19 22:23 More study needed. 閱讀(569) 評(píng)論(0) 推薦(0)
浙公網(wǎng)安備 33010602011771號(hào)