#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..
#include using namespace std; int main(){ int N, M; cin >> N >> M; int vip[41]={0}; int dp[41]={0}; int ans=1; for(int i=1; i> vip[i]; dp[0]=1; dp[1]=1; dp[2]=2; for(int i=3; i