Submission #976929

#TimeUsernameProblemLanguageResultExecution timeMemory
976929Rux007Lozinke (COCI17_lozinke)C++14
40 / 100
1093 ms860 KiB
#include <bits/stdc++.h> using namespace std; int n, fr[20005], sumi; char a[20005][20]; int main() { cin >> n; for(int i = 1; i <= n; i ++) cin >> a[i]; for(int i = 1; i <= n; i ++) { for(int j = 1; j <= n; j ++) { if(i == j) continue; char *p = strstr(a[i], a[j]); if(p != NULL) sumi ++; } } cout << sumi; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...