全部评论 10

  • 你编了个dr啊!:
    编译错误: /code/judger/test/1892807411052548096/main.cpp:17:11: error: empty character constant
    17 | if(a[i][j]'')cout<<"";
    | ^~
    /code/judger/test/1892807411052548096/main.cpp: In function 'int main()':
    /code/judger/test/1892807411052548096/main.cpp:17:11: error: expected ')' before '\x0'
    17 | if(a[i][j]'')cout<<"";
    | ~ ^~
    | )
    /code/judger/test/1892807411052548096/main.cpp:23:11: error: expected ')' before ''
    23 | if(a[l][r]'
    ')
    | ~ ^~~
    | )

    2025-02-21 来自 云南

    0
  • What the hell does ac dog give birth to? Or an error?

    2024-12-15 来自 浙江

    0
  • 编译错误: /code/judger/test/1868138038275731456/main.cpp:17:11: error: empty character constant
    17 | if(a[i][j]'')cout<<"";
    | ^~
    /code/judger/test/1868138038275731456/main.cpp: In function 'int main()':
    /code/judger/test/1868138038275731456/main.cpp:17:11: error: expected ')' before '\x0'
    17 | if(a[i][j]'')cout<<"";
    | ~ ^~
    | )
    /code/judger/test/1868138038275731456/main.cpp:23:11: error: expected ')' before ''
    23 | if(a[l][r]'
    ')
    | ~ ^~~
    | )

    2024-12-15 来自 浙江

    0
  • I don't want to speak Chinese.

    2024-12-15 来自 浙江

    0
  • The error is multiplied by 1000.

    2024-12-15 来自 浙江

    0
  • #include <iostream>
    #include <vector>

    using namespace std;

    int main() {
    int n, m;
    cin >> n >> m;

    vector<vector<char>> grid(n, vector<char>(m));
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            cin >> grid[i][j];
        }
    }
    
    // 输出结果
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            if (grid[i][j] == '*') {
                cout << '*';
            } else {
                int count = 0;
                // 检查周围8个方向
                for (int dx = -1; dx <= 1; ++dx) {
                    for (int dy = -1; dy <= 1; ++dy) {
                        if (dx == 0 && dy == 0) continue; // 跳过自身
                        int nx = i + dx, ny = j + dy;
                        if (nx >= 0 && nx < n && ny >= 0 && ny < m && grid[nx][ny] == '*') {
                            count++;
                        }
                    }
                }
                cout << count;
            }
        }
        cout << endl;
    }
    
    return 0;
    

    }
    Given by AI.

    2024-12-15 来自 浙江

    0
  • 报错x4

    2024-11-06 来自 广东

    0
  • 编译错误: /code/judger/test/1836736091462660096/main.cpp:17:11: error: empty character constant
    if(a[i][j]'')cout<<"";
    ^~
    /code/judger/test/1836736091462660096/main.cpp: In function 'int main()':
    /code/judger/test/1836736091462660096/main.cpp:17:11: error: expected ')' before '\x0'
    /code/judger/test/1836736091462660096/main.cpp:23:11: error: expected ')' before ''
    if(a[l][r]'
    ')
    ^~~

    2024-09-19 来自 天津

    0
  • 报错x3

    2024-07-05 来自 北京

    0
  • 报错

    2024-06-05 来自 广东

    0
首页