/* Sample solution for NCPC 2006: Random Walking * Author: Truls A. Bjoerklund * * The solution is with dynamic programming, always keeping track of the * probability of beeing in a given node at a given time. */ import java.io.*; import java.util.ArrayList; public class random_tab { static int k,n,e; static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); public static void readCase() throws Exception{ String[] inp = in.readLine().split(" "); k = Integer.parseInt(inp[0]); n = Integer.parseInt(inp[1]); e = Integer.parseInt(inp[2]); } public static void main(String[] args) throws Exception{ readCase(); outer: while(!(k==0 && n==0 && e==0)){ int nodes = 1<0)g[j]+=s[0][i]; for(int j=0;j=0.75){ System.out.println("No"); readCase(); continue outer; } g[j]=0.0; } for(int i=1;i0)g[t]+=s[i%2][j]; } for(int j=0;j=0.75){ System.out.println("No"); readCase(); continue outer; } g[j]=0.0; } } System.out.println("Yes"); readCase(); } } }