www.acmicpc.net/problem/5546 5546번: 파스타 상근이는 매일 저녁으로 파스타를 만들어 먹는다. 상근이가 만들 수 있는 파스타는 총 세 종류로 토마토 소스, 크림 소스, 바질 소스이다.
상근이는 앞으로 N일 동안 먹을 파스타를 계획하려고 www.acmicpc.net 내 소스 코드 #include #include using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); int a[101] = { 0, }, dp[101][4][4] = { 0, }; int N, K; cin >> N >> K; while (K--) { int t1, t2; cin >> t1 >> t2; a[t1] = t2; }.....
원문 링크 : 백준 5546 _ 파스타