QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#218465 | #6743. water235 | Geospiza# | WA | 1ms | 3436kb | C++20 | 695b | 2023-10-18 13:00:55 | 2023-10-18 13:00:56 |
Judging History
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]