본문 바로가기
C++

[프로그래머스] 배열의 유사도

by 띰쥬 2025. 9. 4.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

int solution(vector<string> s1, vector<string> s2) {
    int answer = 0;
    
    for(auto one : s1)
    {
        for(auto two : s2)
        {
            if(one==two)
                answer++;
        }
    }
    
    return answer;
}

728x90
반응형
LIST

댓글