#include #include using namespace std; class Table{ private : static const int KNOWN = 0; static const int UNKNOWN = 1; static const int ANSWERED = 2; int size_x,size_y; long cell[100][10]; char flag[100][10]; public : void Load(int sx,int sy); void FillTable(); void PrintAnswer(); }; void Table::Load(int sx,int sy){ string str; int x,y; size_x = sx+1; size_y = sy+1; for(y=0;y> str; if(str == "?"){ cell[y][x] = 0; flag[y][x] = UNKNOWN; }else{ cell[y][x] = atol(str.c_str()); flag[y][x] = KNOWN; } } } } void Table::FillTable(){ bool edit_flag; int count; int tmp,trg; do{ edit_flag = false; for(int x=0;x> y; if(y==0) break; cin >> x; if(first_flag){ first_flag = false; }else{ cout << endl; } t.Load(x,y); t.FillTable(); t.PrintAnswer(); } return 0; }