전화번호 목록 [백준 5052번] 전화번호 목록 2021. 9. 19. 01:50 문제 링크 https://www.acmicpc.net/problem/5052 5052번: 전화번호 목록 첫째 줄에 테스트 케이스의 개수 t가 주어진다. (1 ≤ t ≤ 50) 각 테스트 케이스의 첫째 줄에는 전화번호의 수 n이 주어진다. (1 ≤ n ≤ 10000) 다음 n개의 줄에는 목록에 포함되어 있는 전화번호가 www.acmicpc.net C++ 풀이 #include #include #include using namespace std; int char_to_int(char c) { return c - '0'; } struct Trie { Trie* children[10]; bool is_end = false; void insert(const char* num) { if (*num == '\0') {.. [프로그래머스] 전화번호 목록 2020. 3. 22. 00:38 문제 링크 https://programmers.co.kr/learn/courses/30/lessons/42577 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr C++ 풀이 #include #include using namespace std; bool solution(vector phone_book) { bool answer = true; for (int i = 0; i < phone_book.size(); i++) { for (int j = 0; j < i; j++) { //이전 전화번호들과 비교 int cmp_length = (phone_book[i]... 이전 1 다음 1/1