QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#218466 | #6743. water235 | Geospiza# | WA | 0ms | 3612kb | C++20 | 700b | 2023-10-18 13:04:06 | 2023-10-18 13:04:07 |
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)%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
*/
Details
Tip: Click on the bar to expand more detailed information
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]