재귀

알고리즘 문제 풀이/1DP_과제(~180615)

180405_14501_퇴사

//https://www.acmicpc.net/problem/14501 #include #include using namespace std; int N; int counsel[16][2];int dp[16]; void input();void solve(int today, int earn); int main(){ cin >> N; input(); solve(counsel[1][0], counsel[1][1]); solve(1, 0); cout counsel[i][0] >> counsel[i][1];} void solve(int today, int earn){ if(today=N){ return; } solve(today+counsel[today+1][0], earn+counsel[today+1][1]); ..

bong sue
'재귀' 태그의 글 목록