QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#218465#6743. water235Geospiza#WA 1ms3436kbC++20695b2023-10-18 13:00:552023-10-18 13:00:56

Judging History

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

  • [2023-10-18 13:00:56]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3436kb
  • [2023-10-18 13:00:55]
  • 提交

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)|(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: 1ms
memory: 3436kb

input:

2 1

output:

2
1
1

result:

ok The answer is correct.

Test #2:

score: -100
Wrong Answer
time: 1ms
memory: 3336kb

input:

3 3

output:

3
101
000
100

result:

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