DFS the life without backtracking
int foo(){do{int x=rand6-1;//0~5int y=rand6-1;}while((x*6+y)==35); //0~34 is validreturn (x*6+y)%7+1;//1~7}
No comments:
Post a Comment