QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#49260 | #2540. Build The Grid | Bovmelo | RE | 0ms | 0kb | C++20 | 742b | 2022-09-19 20:51:27 | 2022-09-19 20:51:32 |
Judging History
answer
// Nothing is Given, Everything is Earned.
#include<bits/stdc++.h>
using namespace std;
template<class T> constexpr auto vec(int sz=0,auto ...dim)
{
if constexpr(sizeof...(dim)==0) return move(vector<T>(sz));
else return move(vector(sz,vec<T>(dim...)));
}
template<auto val> constexpr auto vec(int sz=0,auto ...dim)
{
if constexpr(sizeof...(dim)==0) return move(vector(sz,val));
else return move(vector(sz,vec<val>(dim...)));
}
int main()
{
int n; cin>>n;
auto a=vec<0>(n,n);
for(int i=0;i<n-2;i++)
{
for(int j=1;j<=i+1;i++) a[i][j]=1;
}
for(int i=0;i<n-1;i++) a[n-1][i]=1;
for(auto i:a)
{
for(auto j:i) cout<<(j?'B':'W');
cout<<"\n";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Runtime Error
input:
3