QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#218689#6743. water235Berlin_JacorWA 11ms50680kbC++14664b2023-10-18 17:05:552023-10-18 17:05:56

Judging History

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

  • [2023-10-18 17:05:56]
  • 评测
  • 测评结果:WA
  • 用时:11ms
  • 内存:50680kb
  • [2023-10-18 17:05:55]
  • 提交

answer

#include<bits/stdc++.h>
//#define int long long
using namespace std;
const int mod = 998244353;
signed main() {
	int n,m;
	cin>>n>>m;
	map<int,int>p[1000005];
	int ans=0;
	for(int i=1;i<=n;++i) {
		for(int j=1;j<=m;++j) {
			if(i==1&&j==1){p[i][j]=1;++ans;}
			if(i==2&&j==2){p[i][j]=1;++ans;}
			if(i==1&&j%2==0&&j>2){p[i][j]=1;++ans;}
			if(j==1&&i%2==0&&i>2){p[i][j]=1;++ans;}
			if(i==1&&j==m&&j>2){p[i][j]=1;++ans;}
			if(i==n&&j==1&&i>2){p[i][j]=1;++ans;}
		}
	}
	cout<<ans<<"\n";
	for(int i=1;i<=n;++i) {
		for(int j=1;j<=m;++j) {
            if(p[i][j])
			cout<<p[i][j]<<" ";
            else cout<<"0 ";
		}
		cout<<"\n";
	}
}

详细

Test #1:

score: 0
Wrong Answer
time: 11ms
memory: 50680kb

input:

2 1

output:

1
1 
0 

result:

wrong answer The answer is wrong: expected = 2, found = 1