Submission #116841

# Submission time Handle Problem Language Result Execution time Memory
116841 2019-06-14T02:32:54 Z taozai123 Doktor (COCI17_doktor) C++14
0 / 100
96 ms 10376 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 4 ms 1024 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 3 ms 896 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 11 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 1280 KB Integer 34281 violates the range [1, 4853]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 1784 KB Integer 74686 violates the range [1, 10000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 64 ms 6080 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 96 ms 10376 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 89 ms 8872 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -