QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#773925#55. 欧几里得距离之和I_be_wannaCompile Error//C++2011.7kb2024-11-23 10:52:332024-11-23 10:52:33

Details

answer.code: In function ‘void snake_move()’:
answer.code:421:23: error: ‘key’ was not declared in this scope; did you mean ‘key_t’?
  421 |     int history_key = key;
      |                       ^~~
      |                       key_t
answer.code:422:9: error: ‘_kbhit’ was not declared in this scope
  422 |     if (_kbhit())
      |         ^~~~~~
answer.code:425:15: error: ‘_getch’ was not declared in this scope; did you mean ‘getc’?
  425 |         key = _getch();
      |               ^~~~~~
      |               getc
answer.code:428:9: error: ‘changeflag’ was not declared in this scope
  428 |     if (changeflag == 1)//还没吃到食物,把尾巴擦掉
      |         ^~~~~~~~~~
answer.code:430:16: error: ‘snake’ was not declared in this scope
  430 |         gotoxy(snake.x[snake.len - 1], snake.y[snake.len - 1]);
      |                ^~~~~
answer.code:430:9: error: ‘gotoxy’ was not declared in this scope
  430 |         gotoxy(snake.x[snake.len - 1], snake.y[snake.len - 1]);
      |         ^~~~~~
answer.code:433:18: error: ‘snake’ was not declared in this scope
  433 |     for (int i = snake.len - 1; i > 0; i--)
      |                  ^~~~~
answer.code:444:13: error: ‘snake’ was not declared in this scope
  444 |     case 72:snake.y[0]--; break;
      |             ^~~~~
answer.code:449:12: error: ‘snake’ was not declared in this scope
  449 |     gotoxy(snake.x[0], snake.y[0]);
      |            ^~~~~
answer.code:449:5: error: ‘gotoxy’ was not declared in this scope
  449 |     gotoxy(snake.x[0], snake.y[0]);
      |     ^~~~~~
answer.code:452:5: error: ‘changeflag’ was not declared in this scope
  452 |     changeflag = 1;
      |     ^~~~~~~~~~
answer.code: In function ‘void creatfood()’:
answer.code:456:9: error: ‘snake’ was not declared in this scope
  456 |     if (snake.x[0] == food.x && snake.y[0] == food.y)//只有蛇吃到食物,才能生成新食物
      |         ^~~~~
answer.code:456:23: error: ‘food’ was not declared in this scope; did you mean ‘fmod’?
  456 |     if (snake.x[0] == food.x && snake.y[0] == food.y)//只有蛇吃到食物,才能生成新食物
      |                       ^~~~
      |                       fmod
answer.code:458:9: error: ‘changeflag’ was not declared in this scope
  458 |         changeflag = 0;
      |         ^~~~~~~~~~
answer.code:460:13: error: ‘speed’ was not declared in this scope
  460 |         if (speed <= 100)speed += 10;
      |             ^~~~~
answer.code:464:32: error: ‘width’ was not declared in this scope; did you mean ‘wcwidth’?
  464 |             food.x = rand() % (width - 6) + 2;//限定食物的x范围不超出围墙,但不能保证food.x为偶数
      |                                ^~~~~
      |                                wcwidth
answer.code:465:32: error: ‘hight’ was not declared in this scope
  465 |             food.y = rand() % (hight - 2) + 1;
      |                                ^~~~~
answer.code:473:9: error: ‘gotoxy’ was not declared in this scope
  473 |         gotoxy(food.x, food.y);    printf("○");
      |         ^~~~~~
answer.code: In function ‘bool Gameover()’:
answer.code:480:9: error: ‘snake’ was not declared in this scope
  480 |     if (snake.x[0] == 0 || snake.x[0] == width - 2)return false;
      |         ^~~~~
answer.code:480:42: error: ‘width’ was not declared in this scope; did you mean ‘wcwidth’?
  480 |     if (snake.x[0] == 0 || snake.x[0] == width - 2)return false;
      |                                          ^~~~~
      |                                          wcwidth
answer.code:481:9: error: ‘snake’ was not declared in this scope
  481 |     if (snake.y[0] == 0 || snake.y[0] == hight - 1)  return false;
      |         ^~~~~
answer.code:481:42: error: ‘hight’ was not declared in this scope
  481 |     if (snake.y[0] == 0 || snake.y[0] == hight - 1)  return false;
      |                                          ^~~~~
answer.code:483:9: error: ‘snake’ was not declared in this scope
  483 |     if (snake.len == SNAKESIZE)              return false;
      |         ^~~~~
answer.code:483:22: error: ‘SNAKESIZE’ was not declared in this scope
  483 |     if (snake.len == SNAKESIZE)              return false;
      |                      ^~~~~~~~~
answer.code:485:25: error: ‘snake’ was not declared in this scope
  485 |     for (int i = 1; i < snake.len; i++)
      |                         ^~~~~
answer.code: At global scope:
answer.code:492:5: error: redefinition of ‘int main()’
  492 | int main()
      |     ^~~~
answer.code:214:5: note: ‘int main()’ previously defined here
  214 | int main() {
      |     ^~~~
answer.code: In function ‘int main()’:
answer.code:513:17: error: ‘Sleep’ was not declared in this scope; did you mean ‘sleep’?
  513 |                 Sleep(1000);
      |                 ^~~~~
      |                 sleep
answer.code:516:5: error: ‘drawmap’ was not declared in this scope
  516 |     drawmap();
      |     ^~~~~~~
answer.code:521:9: error: ‘Sleep’ was not declared in this scope; did you mean ‘sleep’?
  521 |         Sleep(a);//蛇的移动速度
      |         ^~~~~
      |         sl...