QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#521652#7042. So EasyWendyChen#Compile Error//C++23834b2024-08-16 13:38:022024-08-16 13:38:02

Judging History

你现在查看的是最新测评结果

  • [2024-08-16 13:38:02]
  • 评测
  • [2024-08-16 13:38:02]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define gyx ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define endl "\n"
#define int long long
const int inf = 0x3f3f3f3f;
const int INF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e3 + 50;
const int ovo = 0;
int a[N][N];
signed main() {
    gyx;
    int n;
    cin >> n;
    int x, y;
    for (int i = 1; i <= n;i++){
        for (int j = 1; j <= n; j++){    
            cin >> a[i][j];
            if (a[i][j] == -1)
                x = i, y = j;
        }
    }
    int x0, y0;
    if (x + 1 > n)
        x0 = x - 1;
    else
        x0 = x + 1;
    if (y + 1 > n)
        y0 = y - 1;
    else
        y0 = y + 1;
    cout << a[x0][y] + a[x][y0] - a[x0][y0];
    return ovo;
}

詳細信息

answer.code:12:1: error: extended character   is not valid in an identifier
   12 |     gyx;
      | ^
answer.code:12:3: error: extended character   is not valid in an identifier
   12 |     gyx;
      |   ^
answer.code:13:1: error: extended character   is not valid in an identifier
   13 |     int n;
      | ^
answer.code:13:3: error: extended character   is not valid in an identifier
   13 |     int n;
      |   ^
answer.code:14:1: error: extended character   is not valid in an identifier
   14 |     cin >> n;
      | ^
answer.code:14:3: error: extended character   is not valid in an identifier
   14 |     cin >> n;
      |   ^
answer.code:15:1: error: extended character   is not valid in an identifier
   15 |     int x, y;
      | ^
answer.code:15:3: error: extended character   is not valid in an identifier
   15 |     int x, y;
      |   ^
answer.code:16:1: error: extended character   is not valid in an identifier
   16 |     for (int i = 1; i <= n;i++){
      | ^
answer.code:16:3: error: extended character   is not valid in an identifier
   16 |     for (int i = 1; i <= n;i++){
      |   ^
answer.code:17:1: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      | ^
answer.code:17:3: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      |   ^
answer.code:17:5: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      |     ^
answer.code:17:7: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      |       ^
answer.code:17:39: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      |                                       ^
answer.code:17:41: error: extended character   is not valid in an identifier
   17 |         for (int j = 1; j <= n; j++){    
      |                                         ^
answer.code:18:1: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      | ^
answer.code:18:3: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      |   ^
answer.code:18:5: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      |     ^
answer.code:18:7: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      |       ^
answer.code:18:9: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      |         ^
answer.code:18:11: error: extended character   is not valid in an identifier
   18 |             cin >> a[i][j];
      |           ^
answer.code:19:1: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      | ^
answer.code:19:3: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      |   ^
answer.code:19:5: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      |     ^
answer.code:19:7: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      |       ^
answer.code:19:9: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      |         ^
answer.code:19:11: error: extended character   is not valid in an identifier
   19 |             if (a[i][j] == -1)
      |           ^
answer.code:20:1: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      | ^
answer.code:20:3: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |   ^
answer.code:20:5: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |     ^
answer.code:20:7: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |       ^
answer.code:20:9: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |         ^
answer.code:20:11: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |           ^
answer.code:20:13: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |             ^
answer.code:20:15: error: extended character   is not valid in an identifier
   20 |                 x = i, y = j;
      |               ^
answer.code:21:1: error: extended character   is not valid in an identifier
   21 |         }
      | ^
answer.code:21:3: error: extended character   is not valid in an identifier
   21 |         }
      |   ^
answer.code:21:5: error: extended character   is not valid in an identifier
   21 |         }
      |     ^
answer.code:21:7: error: extended character   is not valid in an id...