Loading README.md +3 −0 Changes for README.md: 3 added lines, 0 removed lines. Original line number Diff line number Diff line # 2019/08/26 追記 配線失敗時にボードを出力しないように変更しました # 実行方法 ``` cd nszw-solver Loading main.cpp +5 −1 Changes for main.cpp: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,8 +6,12 @@ int main(void){ read_problem(); solver(); if(solver()){ printf("success!"); print_answer(); }else{ printf("failed..."); } return 0; } Loading solver.cpp +8 −2 Changes for solver.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ short int board_str[900]; short int line_board[72][72]; short int mino_board[72][72]; short int put_data[72][72]; short int success=0; short int answerw=0,answerh=0; vector <int> mino_order; void reset_board(void){ Loading @@ -49,6 +51,8 @@ void show_blocks(){ } void read_data(void){ answerw=W; answerh=H; //show_blocks(); return; } Loading Loading @@ -552,6 +556,7 @@ int line(){ if(status){ //std::cout << "success to line" << std::endl; make_answer(); success=1; }else{ //std::cout << "failed to line" << std::endl; } Loading Loading @@ -1010,11 +1015,12 @@ void solve(void){ return; } void solver(void){ int solver(void){ read_data(); solve(); /* shape(); */ //translate(); return; if(w>answerw || h>answerh) success=0; return success; } solver.h +1 −1 Changes for solver.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -5,6 +5,6 @@ #define MAXSIZE 128 void solver(void); int solver(void); #endif // _SOLVER_H_ Loading
README.md +3 −0 Changes for README.md: 3 added lines, 0 removed lines. Original line number Diff line number Diff line # 2019/08/26 追記 配線失敗時にボードを出力しないように変更しました # 実行方法 ``` cd nszw-solver Loading
main.cpp +5 −1 Changes for main.cpp: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,8 +6,12 @@ int main(void){ read_problem(); solver(); if(solver()){ printf("success!"); print_answer(); }else{ printf("failed..."); } return 0; } Loading
solver.cpp +8 −2 Changes for solver.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ short int board_str[900]; short int line_board[72][72]; short int mino_board[72][72]; short int put_data[72][72]; short int success=0; short int answerw=0,answerh=0; vector <int> mino_order; void reset_board(void){ Loading @@ -49,6 +51,8 @@ void show_blocks(){ } void read_data(void){ answerw=W; answerh=H; //show_blocks(); return; } Loading Loading @@ -552,6 +556,7 @@ int line(){ if(status){ //std::cout << "success to line" << std::endl; make_answer(); success=1; }else{ //std::cout << "failed to line" << std::endl; } Loading Loading @@ -1010,11 +1015,12 @@ void solve(void){ return; } void solver(void){ int solver(void){ read_data(); solve(); /* shape(); */ //translate(); return; if(w>answerw || h>answerh) success=0; return success; }
solver.h +1 −1 Changes for solver.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -5,6 +5,6 @@ #define MAXSIZE 128 void solver(void); int solver(void); #endif // _SOLVER_H_