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