대회 or 인턴 C++
#include #include using namespace std; int n, m, k; int answer = -1; void calmax(int girl, int boy, int i) { int value = min(girl / 2, boy); if (i == 0) { answer = max(answer, value); return; } else { if (value = boy) calmax(girl - 1, boy, i - 1); else calmax(girl, boy - 1, i - 1); } } int main(void) { cin >> n >> m >> k; calmax(n,m,k); cout
2019. 10. 11.