QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#309530#8020. Mine Sweeper IIalgotester#WA 0ms3604kbC++23980b2024-01-20 17:59:452024-01-20 17:59:46

Judging History

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

  • [2024-01-20 17:59:46]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3604kb
  • [2024-01-20 17:59:45]
  • 提交

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