QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#378679 | #8020. Mine Sweeper II | comeintocalm# | WA | 1ms | 3744kb | C++17 | 743b | 2024-04-06 14:08:53 | 2024-04-06 14:08:53 |
Judging History
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