lina_os

Untitled

Apr 4th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  8. int t;
  9. cin >> t;
  10. while (t--) {
  11. int n, k;
  12. cin >> n >> k;
  13. if ((n+1)/2<k) cout << -1 << endl;
  14. else {
  15. for (int i=0; i<n; i++) {
  16. for (int j=0; j<n; j++) {
  17. if (i==j && i%2==0 && k--) cout << 'R';
  18. else cout << '.';
  19. }
  20. cout << endl;
  21. }
  22. }
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment