QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#742873#8020. Mine Sweeper IIEMTzWA 4ms66916kbC++201.1kb2024-11-13 17:32:432024-11-13 17:32:44

Judging History

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

  • [2024-11-13 17:32:44]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:66916kb
  • [2024-11-13 17:32:43]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define ull unsigned long long
using namespace std;
typedef pair<int,int>PII;
typedef pair<int,PII>PPI;
typedef array<int,3>ar;
typedef __int128 i28; 
const int N=1e6+100;
const int N1=1e9+9;
const int M=998244353;
const ull mask = std::chrono::steady_clock::now().time_since_epoch().count();
mt19937_64 rng(time(0));
const int M1=19260817;
const int base=233;
const int base1=131;
const int INF = 0x3f3f3f3f;
int sum[N];
string a[N],b[N];
void solve()
{
	int n,m;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		a[i]=" "+a[i];
	}
	for(int i=1;i<=n;i++)
	{
		cin>>b[i];
		b[i]=" "+b[i];
	}
	int cnt=0;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			if(a[i][j]!=b[i][j]) cnt++;
		}
	}
	if(cnt>n*m/2) 
	{
		for(int i=1;i<=n;i++)
		{
			for(int j=1;j<=m;j++)
			{
				if(a[i][j]!=b[i][j]) 
				{
					a[i][j]=b[i][j];
					
				}
			}
		}
	}
	for(int i=1;i<=n;i++) cout<<a[i]<<"\n";
}
signed main()
{
	std::ios::sync_with_stdio(false);
	cout.tie(0);cin.tie(0);
	int _=1;
//	cin>>_;
	while(_--)
	{
		solve();
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 66916kb

input:

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

output:

 X.X.
 .X..

result:

wrong answer Line " X.X." doesn't correspond to pattern "[.X]{4}"