QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#218466#6743. water235Geospiza#WA 0ms3612kbC++20700b2023-10-18 13:04:062023-10-18 13:04:07

Judging History

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

  • [2023-10-18 13:04:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3612kb
  • [2023-10-18 13:04:06]
  • 提交

answer

#pragma GCC optimize(3,"Ofast","inline")
#pragma GCC optimize(2)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define all(x) x.begin(),x.end()
#define rep(i,a,b) for(ll i=a;i<=b;++i)
#define per(i,a,b) for(ll i=a;i>=b;--i)
typedef pair<ll,ll> pll;
const ll N=4e5+5;
ll n,m;
int	 main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
	int t=1;
	//cin>>t;
	while(t--)
    {
        cin>>n>>m;
        cout<<(n+m+1)/2<<"\n";
        rep(i,1,n)
        {
            rep(j,1,m)cout<<((((i-j+m-1)%2==0)|(i-j==n-1))&(min(i,j)==1));
            cout<<"\n";
        }
    }
}
/*
1
3 2
10 10 5
1 2
1 3
3 2
10 10 5
1 2
1 3
*/

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3612kb

input:

2 1

output:

2
1
1

result:

ok The answer is correct.

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3608kb

input:

3 3

output:

3
101
000
100

result:

wrong answer Integer 101 violates the range [0, 1]