QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#378679#8020. Mine Sweeper IIcomeintocalm#WA 1ms3744kbC++17743b2024-04-06 14:08:532024-04-06 14:08:53

Judging History

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

  • [2024-04-06 14:08:53]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3744kb
  • [2024-04-06 14:08:53]
  • 提交

answer

#include <bits/stdc++.h>

int main() {
    int n, m;
    std::cin >> n >> m;
    std::vector<std::string> a(n);
    std::vector<std::string> b(n);
    for (int i = 0; i < n; ++i)
        std::cin >> a[i];
    for (int i = 0; i < n; ++i)
        std::cin >> b[i];
    int cnt = 0;
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
            if (a[i] != b[i])
                ++cnt;
    if (cnt <= n * m / 2) {
        for (int i = 0; i < n; ++i)
            std::cout << a[i] << '\n';
    } else {
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < m; ++j)
                std::cout << (a[i][j] == '.' ? 'X' : '.');
            std::cout << '\n';
        }
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3588kb

input:

2 4
X..X
X.X.
X.X.
.X..

output:

.XX.
.X.X

result:

ok OK, Accepted.

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3744kb

input:

7 28
............................
.XXXXX...XXXX..XXXX....XXXX.
...X....XX.....X..XX..XX....
...X....X......XXXX...X.....
...X....XX.....X......XX....
.XXXXX...XXXX..X.......XXXX.
............................
............................
..XXXX...XXXX..XXXXX..X...X.
.XX.....XX.......X....X...X.
.X......

output:

XXXXXXXXXXXXXXXXXXXXXXXXXXXX
X.....XXX....XX....XXXX....X
XXX.XXXX..XXXXX.XX..XX..XXXX
XXX.XXXX.XXXXXX....XXX.XXXXX
XXX.XXXX..XXXXX.XXXXXX..XXXX
X.....XXX....XX.XXXXXXX....X
XXXXXXXXXXXXXXXXXXXXXXXXXXXX

result:

wrong answer WA, 159/196 entries diff