[백준] C++ 알고리즘 14889번 - 스타트와 링크문제
문제 https://www.acmicpc.net/problem/14889 14889번: 스타트와 링크 예제 2의 경우에 (1, 3, 6), (2, 4, 5)로 팀을 나누면 되고, 예제 3의 경우에는 (1, 2, 4, 5), (3, 6, 7, 8)로 팀을 나누면 된다. www.acmicpc.net 소스코드 #include #include using namespace std; int n; int arr[21][21]; int back(int index, vector& first, vector& second) { if (index == n+1) { if (first.size() != n / 2) return -1; if (second.size() != n / 2) return -1; int t1 = 0; in..