Commit d3b2bbf9 authored by makoto.nishizawa's avatar makoto.nishizawa

show status

parent f325f14b
...@@ -6,8 +6,12 @@ ...@@ -6,8 +6,12 @@
int main(void){ int main(void){
read_problem(); read_problem();
solver(); if(solver()){
print_answer(); printf("success!");
print_answer();
}else{
printf("failed...");
}
return 0; return 0;
} }
......
No preview for this file type
...@@ -26,6 +26,7 @@ short int board_str[900]; ...@@ -26,6 +26,7 @@ short int board_str[900];
short int line_board[72][72]; short int line_board[72][72];
short int mino_board[72][72]; short int mino_board[72][72];
short int put_data[72][72]; short int put_data[72][72];
short int success=0;
vector <int> mino_order; vector <int> mino_order;
void reset_board(void){ void reset_board(void){
...@@ -552,6 +553,7 @@ int line(){ ...@@ -552,6 +553,7 @@ int line(){
if(status){ if(status){
//std::cout << "success to line" << std::endl; //std::cout << "success to line" << std::endl;
make_answer(); make_answer();
success=1;
}else{ }else{
//std::cout << "failed to line" << std::endl; //std::cout << "failed to line" << std::endl;
} }
...@@ -1010,11 +1012,11 @@ void solve(void){ ...@@ -1010,11 +1012,11 @@ void solve(void){
return; return;
} }
void solver(void){ int solver(void){
read_data(); read_data();
solve(); solve();
/* shape(); */ /* shape(); */
//translate(); //translate();
return; return success;
} }
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
#define MAXSIZE 128 #define MAXSIZE 128
void solver(void); int solver(void);
#endif // _SOLVER_H_ #endif // _SOLVER_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment