diff --git a/HDOJ/5842_lyhylex.cpp b/HDOJ/5842_lyhylex.cpp new file mode 100644 index 0000000..56015ae --- /dev/null +++ b/HDOJ/5842_lyhylex.cpp @@ -0,0 +1,19 @@ +///好厉害~!来自lyhylex (CSDN) +#include +#include +#include +using namespace std; +char s[100000 + 9]; +int main() +{ + int ca = 1, t; + scanf("%d", &t); + while (t--) + { + scanf("%s", s); + int n = strlen(s); + sort(s, s + n); + printf("Case #%d: %d\n", ca++, unique(s, s + n) - s); + } + return 0; +}