제출 #500144

#제출 시각아이디문제언어결과실행 시간메모리
500144kappaLozinke (COCI17_lozinke)C++14
40 / 100
1092 ms1100 KiB
#include <bits/stdc++.h> using namespace std; int n, ans; string str[20005]; int main(){ cin >> n; for (int i = 0; i < n; i++) { cin >> str[i]; } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if(i == j) continue; int tmp = str[j].find(str[i]); if(tmp != -1){ ans++; } } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...