모든 이름이 소문자로 주어지기 때문에 특별히 고려해야 할 사항이 없었다.
#include <iostream>
#include <string>
using namespace std;
int n, ans;
string s, comp;
int main() {
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin >> n >> s;
for (int i = 0; i < n; i++) {
cin >> comp;
if (comp.find(s) != string::npos) ans++;
}
cout << ans;
return 0;
}
'Alrogithm > 구름(GOORM)' 카테고리의 다른 글
[구름 알고리즘 먼데이 챌린지] Week1 : 4. 소수 찾기 (0) | 2022.11.04 |
---|---|
[구름 알고리즘 먼데이 챌린지] Week1 : 3. 최장 맨해튼 거리 (0) | 2022.11.04 |
[구름 알고리즘 먼데이 챌린지] Week1 : 1. 경로의 개수 (0) | 2022.11.04 |
[구름 알고리즘 먼데이 챌린지] Week0 : 2. 카드 교환하기 (2) | 2022.11.03 |
[구름 알고리즘 먼데이 챌린지] Week0 : 1.단어장 만들기 (0) | 2022.11.03 |