QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#309530 | #8020. Mine Sweeper II | algotester# | WA | 0ms | 3604kb | C++23 | 980b | 2024-01-20 17:59:45 | 2024-01-20 17:59:46 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long Int;
typedef pair<int,int> PII;
typedef vector<int> VInt;
#define FOR(i, a, b) for(i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(i = (a) - 1; i >= (b); --i)
#define EACH(it, a) for(auto it = (a).begin(); it != (a).end(); ++it)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define SIZE(a) int((a).size())
#define ALL(a) (a).begin(),(a).end()
#define MP make_pair
void SolveTest(int test)
{
int n, m;
cin >> n >> m;
int i, j;
vector<string> a(n), b(n);
FOR(i, 0, n) cin >> a[i];
FOR(i, 0, n) cin >> b[i];
int cnt = 0;
FOR(i, 0, n)
FOR(j, 0, m)
if(a[i][j] != b[i][j])
++cnt;
if(cnt + cnt > n*m)
FOR(i, 0, n)
FOR(j, 0, m)
b[i][j] = b[i][j] == '.' ? 'X' : '.';
FOR(i, 0, n) cout << b[i] << endl;
}
int main()
{
int T, t;
T = 1;
//cin >> T;
FOR(t, 0, T)
{
//cerr << "Solving " << t << "/" << T << endl;
SolveTest(t);
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3604kb
input:
2 4 X..X X.X. X.X. .X..
output:
.X.X X.XX
result:
wrong answer WA, 8/8 entries diff