This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
int n,m;
cin >> n >> m;
vector<vector<bool>> win(n+1,vector<bool>(n+1,true));
win[n][n-1-m]=false;
for(int i=2;i<=n;i++){
for(int j=1;j<i;j++){
if(win[i][j])cout<<'1';
else cout<<'0';
}
cout << '\n';
}
}
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int q;
cin >> q;
while(q--)solve();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |