TRIPATHCNT
https://algospot.com/judge/problem/read/TRIPATHCNT algospot.com :: TRIPATHCNT 삼각형 위의 최대 경로 수 세기 문제 정보 문제 9 5 7 1 3 2 3 5 5 6 위 형태와 같이 삼각형 모양으로 배치된 자연수들이 있습니다. 맨 위의 숫자에서 시작해, 한 번에 한 칸씩 아래로 내려가 맨 아래 algospot.com count(x,y) = (x,y)에서 시작해 맨 아래줄까지 내려가는 최대 경로의 수 #include #include #include using namespace std; int n,triangle[100][100]; int cache[100][100],countCache[100][100]; int path(int x,int y) { i..
Algorithm/ALGOSPOT
2021. 6. 21. 20:38