# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
472762 | Ahmed_Solyman | Lozinke (COCI17_lozinke) | C++14 | 1093 ms | 844 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 <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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |