# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22778 | 2017-04-30T07:25:45 Z | ↓우리보다잘하는팀(#947, ainta, gs12117, gs13068) | New Ocurrences (KRIII5_NO) | C++14 | 1000 ms | 2432 KB |
#include <cstdio> #include <cstring> #include <unordered_map> using namespace std; char a[5005]; unordered_map<unsigned long long, int> d; int main() { long long r = 0; int i, j, k, n; scanf("%s", a); n = strlen(a); for (i = 0; i < n; i++) { a[i] = 'a'; k = 0; for (j = i; j >= 0; j--) { k = 27 * k + a[j]; r += d[k] << 1 | 1; d[k]++; } printf("%lld\n", r); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 1940 KB | Output is correct |
2 | Incorrect | 0 ms | 1940 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2432 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |