# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
116823 | Clementime | Lozinke (COCI17_lozinke) | C++17 | 65 ms | 648 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>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
using namespace std;
typedef long long ll;
#define FOR(i, l, r) for(ll i = l; i <= r; i++)
ll num = 0;
int main(){
string a[2005];
ll n; cin >> n;
FOR(i, 1, n){
cin >> a[i];
}
FOR(i, 1, n){
FOR(j, 1, i - 1){
size_t found = a[i].find(a[j]);
if(found != string::npos) num++;
size_t found1 = a[j].find(a[i]);
if(found1 != string::npos) num++;
}
}
cout << num;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |