알고스팟

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

180103_TRIANGLEPATH

//https://algospot.com/judge/problem/read/TRIANGLEPATH#include using namespace std;int dp[101][101];int tri[101][101]; int main(){ int c; cin >> c; for(int t=0; t> n; for(int i=1; i tri[i][j]; dp[1][1]=tri[1][1]; for(int i=1; i

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

171022_NUMB3RS_두니발 박사의 탈옥

#include using namespace std; int main() { int c; //# of case cin >> c; for(int i=0; i > n >> d >> p; int np; double sum=0; bool map[50][50]={0}; double prob[50][50]={0}; //prob[before][after] moving befor->after probability double dp[101][50]={0}; //dp[day][where is he] for(int r=0; r map[r][c]; if(map[r][c]) cnt++; } for(int c=0; cb마을로 가는 확률 prob[a][b] if(map[r][c]) prob[r][c]=(double)1/(doubl..

bong sue
'알고스팟' 태그의 글 목록