Submission #976975

#TimeUsernameProblemLanguageResultExecution timeMemory
976975Rux007Lozinke (COCI17_lozinke)C++14
40 / 100
1074 ms1112 KiB
#include <bits/stdc++.h> using namespace std; int n, fr[20005], sumi; char a[20005][20]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); 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...