# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1077355 |
2024-08-27T05:47:16 Z |
komasan |
Lozinke (COCI17_lozinke) |
C++14 |
|
1000 ms |
1056 KB |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e4 + 5;
string a[N];
bool check(string &x, string &y){
int l = 0, r = 0;
int n = x.size(), m = y.size();
while (l < n && r < m){
if (x[l] == y[r]){
l++;
r++;
}
else r++;
}
return l == n;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n; cin >> n;
for (int i = 1; i <= n; i++) cin >> a[i];
int ans = 0;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
if (i != j) ans += check(a[j], a[i]);
cout << ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
860 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
860 KB |
Output isn't correct |
5 |
Incorrect |
18 ms |
860 KB |
Output isn't correct |
6 |
Incorrect |
53 ms |
1056 KB |
Output isn't correct |
7 |
Incorrect |
50 ms |
860 KB |
Output isn't correct |
8 |
Incorrect |
37 ms |
860 KB |
Output isn't correct |
9 |
Execution timed out |
1053 ms |
860 KB |
Time limit exceeded |
10 |
Execution timed out |
1028 ms |
856 KB |
Time limit exceeded |
11 |
Execution timed out |
1039 ms |
860 KB |
Time limit exceeded |
12 |
Execution timed out |
1089 ms |
856 KB |
Time limit exceeded |
13 |
Execution timed out |
1024 ms |
856 KB |
Time limit exceeded |
14 |
Execution timed out |
1060 ms |
860 KB |
Time limit exceeded |
15 |
Execution timed out |
1026 ms |
856 KB |
Time limit exceeded |
16 |
Execution timed out |
1052 ms |
860 KB |
Time limit exceeded |
17 |
Execution timed out |
1085 ms |
860 KB |
Time limit exceeded |
18 |
Execution timed out |
1058 ms |
860 KB |
Time limit exceeded |
19 |
Execution timed out |
1070 ms |
860 KB |
Time limit exceeded |
20 |
Execution timed out |
1031 ms |
856 KB |
Time limit exceeded |