[[TableOfContents]] = 오늘의 문제 = * [https://www.acmicpc.net/problem/11657|타임머신] * [https://www.acmicpc.net/problem/111057|오르막 수] * [https://www.acmicpc.net/problem/12851|숨바꼭질2] = 참가자 = * 15이원준 = 코드 = == 15이원준 == === 타임머신 === {{{ #include #include #include using namespace std; int d[501] = {0,}; int check[501] = {0,}; vector > > vec; int main(){ vec.resize(501); int n,m; cin>>n>>m; for(int i=0; ifirst] || d[it->first] > d[j] + it->second){ update = true; check[it->first] = 1; d[it->first] = d[j] + it->second; } } } } for(int i = 2; i<=n; i++){ if(!check[i]){ cout<<-1< #include using namespace std; int arr[1001][10]; int search(int num, int pri){ if(num == 1){ return 1; } if(arr[num][pri] != -1){ return arr[num][pri]; } int ans = 0; for(int i = 0; i<=pri; i++){ ans += search(num-1, i); ans %= 10007; } arr[num][pri] = ans; return ans; } int main(){ memset(arr,-1,sizeof(arr)); int n; cin >> n; int ans = 0; for(int i = 0; i<10; i++){ ans += search(n,i); ans %= 10007; } cout<< ans <