문제https://www.acmicpc.net/problem/2240 해설경우의수가 너무 커서 dp로 해결-1로 초기화 할 경우 ~ret을 사용하면 -1일때만 false를 반환하도록할 수 있음 코드12345678910111213141516171819202122232425#includeiostream>#includealgorithm>#includecstring> using namespace std; int t,w,dp[1004][2][34], mv[1004]; int go(int idx, int location, int cnt){ if(cnt 0) return -10000; if(idx >= t) return 0; int &ret = dp[idx][location][cnt]; if(~ret) re..