QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#470579 | #8020. Mine Sweeper II | lonlyness | WA | 0ms | 16076kb | C++23 | 1.1kb | 2024-07-10 15:15:46 | 2024-07-10 15:15:47 |
Judging History
answer
#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<cmath>
using namespace std;
#define int long long
#define endl "\n"
const int N = 2e5+10,mod = 998244353;
int n,m,k;
typedef pair<int,int> PII;
string a[N],b[N];
void solve()
{
cin>>n>>m;
for(int i = 0;i< n;i ++)cin>>a[i];
for(int i = 0;i < n;i ++)cin>>b[i];
int ans =0;
for(int i= 0;i< n;i ++)
{
for(int j = 0;j < m;j ++)ans+=(a[i][j]!=b[i][j]);
}
if(ans*2<=n*m)
{
for(int i= 0;i < n;i ++){
for(int j= 0;j < m;j ++)
cout<<a[i][j]<<' ';
cout<<endl;
}
}
else {
for(int i = 0;i < n;i ++)
{
for(int j= 0;j < m;j ++)
{
if(a[i][j]=='.')cout<<'X'<<' ';
else cout<<'.'<<' ';
}
cout<<endl;
}
}
}
signed main()
{
ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);
int t=1;
// cin>>t;
while(t--)
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 16076kb
input:
2 4 X..X X.X. X.X. .X..
output:
. X X . . X . X
result:
wrong answer Line ". X X . " doesn't correspond to pattern "[.X]{4}"