-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path980B.cpp
More file actions
56 lines (45 loc) · 693 Bytes
/
980B.cpp
File metadata and controls
56 lines (45 loc) · 693 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<iostream>
using namespace std;
char a[4][100];
int main(){
int n, k;
bool flag = false;
cin>>n>>k;
for(int i=0; i<4; ++i)
for(int j=0; j<n; ++j)
a[i][j] = '.';
//cout<<"B1\n";
if (k%2 == 0 || k%(n-2) == 0){
cout<<"YES\n";
flag = true;
}
else
cout<<"NO\n";
if(flag){
//cout<<"B2\n";
if(k%2 == 0){
for(int j=1; j<=k/2; ++j){
a[1][j] = '#';
a[2][j] = '#';
}
}
else{
if(k==n-2){
for(int j=1; j<=n-2; ++j)
a[1][j] = '#';
}
else{
for(int j=1; j<=n-2; ++j){
a[2][j] = '#';
a[1][j] = '#';
}
}
}
for(int i=0; i<4; ++i){
for(int j=0; j<n; ++j){
cout<<a[i][j];
}
cout<<endl;
}
}
}