# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
472764 | 2021-09-14T09:53:09 Z | Ahmed_Solyman | Lozinke (COCI17_lozinke) | C++14 | 1000 ms | 844 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n;cin>>n; vector<string>arr(n); for(auto &i:arr)cin>>i; ll ans=0; for(ll i=0;i<n;i++){ for(ll j=0;j<n;j++){ if(i==j)continue; if(arr[j].find(arr[i])!=-1){ ans++; } } } cout<<ans<<endl; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 2 ms | 204 KB | Output is correct |
4 | Correct | 4 ms | 300 KB | Output is correct |
5 | Correct | 20 ms | 304 KB | Output is correct |
6 | Correct | 51 ms | 332 KB | Output is correct |
7 | Correct | 100 ms | 332 KB | Output is correct |
8 | Correct | 56 ms | 332 KB | Output is correct |
9 | Execution timed out | 1083 ms | 588 KB | Time limit exceeded |
10 | Execution timed out | 1062 ms | 588 KB | Time limit exceeded |
11 | Execution timed out | 1082 ms | 716 KB | Time limit exceeded |
12 | Execution timed out | 1082 ms | 716 KB | Time limit exceeded |
13 | Execution timed out | 1085 ms | 844 KB | Time limit exceeded |
14 | Execution timed out | 1099 ms | 844 KB | Time limit exceeded |
15 | Execution timed out | 1067 ms | 844 KB | Time limit exceeded |
16 | Execution timed out | 1076 ms | 844 KB | Time limit exceeded |
17 | Execution timed out | 1090 ms | 844 KB | Time limit exceeded |
18 | Execution timed out | 1076 ms | 844 KB | Time limit exceeded |
19 | Execution timed out | 1096 ms | 844 KB | Time limit exceeded |
20 | Execution timed out | 1089 ms | 844 KB | Time limit exceeded |