{
int base = 10000; int x2 = x / base; int x1 = x % base; int y2 = y / base; int y1 = y % base;
int n1 = x1 * y1; int n2 = x1 * y2; int n3 = x2 * y1; int n4 = x2 * y2;
r[3] = n1 % base;
r[2] = n1 / base + n2 % base + n3 % base;
r[1] = ____________________________________________; // 填空 r[0] = n4 / base;
r[1] += _______________________; // 填空 r[2] = r[2] % base; r[0] += r[1] / base; r[1] = r[1] % base; }
int main(int argc, char* argv[]) {
int x[] = {0,0,0,0};
bigmul(87654321, 12345678, x);
printf(\
return 0; }
第七题:放棋子
今有 6 x 6 的棋盘格。其中某些格子已经预先放好了棋子。现在要再放上去一些,使得:每行每列都正好有3颗棋子。
int N = 0;
bool CheckStoneNum(int x[][6]) {
for(int k=0; k<6; k++) {
int NumRow = 0; int NumCol = 0; for(int i=0; i<6; i++) {
if(x[k][i]) NumRow++; if(x[i][k]) NumCol++; }
if(_____________________) return false; // 填空 }
return true; }
int GetRowStoneNum(int x[][6], int r) {
int sum = 0;
for(int i=0; i<6; i++) if(x[r][i]) sum++;
return sum; }
int GetColStoneNum(int x[][6], int c) {
int sum = 0;
for(int i=0; i<6; i++) if(x[i][c]) sum++; return sum; }
void show(int x[][6]) {
for(int i=0; i<6; i++) {
for(int j=0; j<6; j++) printf(\ printf(\ }
printf(\ }
void f(int x[][6], int r, int c);
void GoNext(int x[][6], int r, int c) {
if(c<6)
_______________________; // 填空 else
f(x, r+1, 0); }
void f(int x[][6], int r, int c) {
if(r==6) {
if(CheckStoneNum(x)) { N++; show(x); } return; }
if(______________) // 已经放有了棋子 {