Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- int main() {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- int t;
- cin >> t;
- while (t--) {
- int n, k;
- cin >> n >> k;
- if ((n+1)/2<k) cout << -1 << endl;
- else {
- for (int i=0; i<n; i++) {
- for (int j=0; j<n; j++) {
- if (i==j && i%2==0 && k--) cout << 'R';
- else cout << '.';
- }
- cout << endl;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment