-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patha.cpp
37 lines (34 loc) · 773 Bytes
/
a.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <bits/stdc++.h>
#define endl '\n'
#define eat cin
#define moo cout
#define int long long
#define fi first
#define se second
using namespace std;
int T, N, K;
char C[40][40];
int32_t main(){
eat.tie(0) -> sync_with_stdio(0);
eat >> T;
while(T--){
eat >> N >> K;
for(int i = 0; i < N; i++) fill(C[i], C[i]+N, '.');
int ci = 0;
for(int i = 0; i < K; i += 1){
if(ci >= N){
ci = -1;
break;
}
C[ci][ci] = 'R';
ci += 2;
}
if(ci == -1) moo << -1 << endl;
else{
for(int i = 0; i < N; i++){
for(int j = 0; j < N; j++) moo << C[i][j];
moo << endl;
}
}
}
}