본문 바로가기

3

1269) 대칭 차집합 (C++) 출처 https://www.acmicpc.net/problem/1269 1269번: 대칭 차집합 첫째 줄에 집합 A의 원소의 개수와 집합 B의 원소의 개수가 빈 칸을 사이에 두고 주어진다. 둘째 줄에는 집합 A의 모든 원소가, 셋째 줄에는 집합 B의 모든 원소가 빈 칸을 사이에 두고 각각 주어 www.acmicpc.net 내 풀이 #include #include using namespace std; int A = 0, B = 0; int input = 0; int result = 0; mapmp; int main() { cin >> A >> B; int result = A; for (int i = 0; i > input; mp[input] = 1; } for (int i =.. 2022. 5. 17.
1620) 나는야 포켓몬 마스터 이다솜 (C++) 출처 https://www.acmicpc.net/problem/1620 1620번: 나는야 포켓몬 마스터 이다솜 첫째 줄에는 도감에 수록되어 있는 포켓몬의 개수 N이랑 내가 맞춰야 하는 문제의 개수 M이 주어져. N과 M은 1보다 크거나 같고, 100,000보다 작거나 같은 자연수인데, 자연수가 뭔지는 알지? 모르면 www.acmicpc.net 내 풀이 #include #include #include using namespace std; map pokemons; string pokemon_number[100001]; string pokemon = ""; int N = 0, M = 0; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(N.. 2022. 5. 15.
14425) 문자열 집합 (C++) 출처 https://www.acmicpc.net/problem/14425 14425번: 문자열 집합 첫째 줄에 문자열의 개수 N과 M (1 ≤ N ≤ 10,000, 1 ≤ M ≤ 10,000)이 주어진다. 다음 N개의 줄에는 집합 S에 포함되어 있는 문자열들이 주어진다. 다음 M개의 줄에는 검사해야 하는 문자열들이 주어 www.acmicpc.net 내 풀이 #include #include using namespace std; int N = 0, M = 0; int result = 0; string input = ""; int main() { cin >> N >> M; mapmp; for (int i = 0; i > input; mp[input] = true; } for (i.. 2022. 5. 11.