|
|
back to boardTL test 2. Why?????????????? #include <bits/stdc++.h> using namespace std; int main() { map<string, int> d; string s; cin >> s; string c = ""; int n = s.size(); for (int i = 0; i < n; i++) { c = s[i]; d[c]++; for (int j = i + 1; j < n; j++) { c += s[j]; d[c]++; } } cout << d.size(); } |
|
|