Title Link: http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1011&cid=719
Sample Input 2 AABCCACDEAA Sample outputcase # 1 3 Case # 2 4
***************************************************
Test instructions: I can only say Test instructions God horse is a cloud, purely interference, directly look at the code bar
1#include <stdio.h>2#include <string.h>3#include <iostream>4#include <algorithm>5#include <math.h>6 using namespacestd;7 #defineN 11008 9 Chars[110000];Ten intv[ -]; One A intMain () - { - inti,t,k=1, Len; the -scanf"%d", &T); - - while(t--) + { -memset (V,0,sizeof(v)); + intans=0; Ascanf"%s", s); atlen=strlen (s); - - for(i=0; i<len;i++) -v[s[i]-'a']=1; - - for(i=0;i< -; i++) in if(V[i]) -ans++; to +printf"Case #%d:%d\n", k++, ans); - } the return 0; *}
2016 Chinese college student Program design Contest-Network tryouts 1011Lweb and String