ll@gx,@gy,@N,@F; ll dp[500][500]{}; rep(i,500)rep(j,500)dp[i][j]=1d9; dp[0][0]=0; ll@(X,Y,C)[N]; rep(i,111)rep(j,111) { dp[i+1][j]