# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
569202 | Garguy22 | Lozinke (COCI17_lozinke) | C++17 | 1095 ms | 6740 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
const int N = 2e5 + 7;
string str[N];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
for(int i = 0; i < n; i++)
cin >> str[i];
int ans = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
if(i != j){
int x = str[j].find(str[i]);
if(x != -1)
ans++;
}
}
}
cout << ans << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |