Submission #116843

# Submission time Handle Problem Language Result Execution time Memory
116843 2019-06-14T02:34:22 Z taozai123 Doktor (COCI17_doktor) C++17
0 / 100
94 ms 10472 KB
#include<bits/stdc++.h>

using namespace std;

int n;

string l[20014];

unordered_set<string> s;
unordered_map<string, int> cnt;

int main(void) {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> l[i];
    s.clear();

    for (int j = 0; j < (int) l[i].size(); ++j) {
      string a;
      for (int k = j; k < (int) l[i].size(); ++k) {
        a.push_back(l[i][k]);
       
        s.insert(a);
      }
    }

    for (auto &x : s)
      cnt[x]++;
  }

  int sol = 0;
  for (auto &x : l)
    sol += cnt[x];

  cout << sol - n << endl;

  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 896 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 1024 KB Integer 41 violates the range [1, 32]
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 1024 KB Integer 1128 violates the range [1, 321]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 1152 KB Integer 11973 violates the range [1, 2000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1280 KB Integer 31388 violates the range [1, 4500]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1252 KB Integer 34281 violates the range [1, 4853]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 1700 KB Integer 74686 violates the range [1, 10000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 63 ms 6204 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 94 ms 10472 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 80 ms 8744 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -