-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4751.cpp
More file actions
53 lines (46 loc) · 783 Bytes
/
4751.cpp
File metadata and controls
53 lines (46 loc) · 783 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
// 4751. 다솔이의 다이아몬드 장식
// 2019.06.30
#include<iostream>
#include<string>
using namespace std;
int main()
{
int test_case;
int T;
cin >> T;
for (test_case = 1; test_case <= T; ++test_case)
{
string s;
cin >> s;
string ans[5];
// 맨위, 맨아래
ans[0] += "..#..";
for (int i = 1; i < s.size(); i++)
{
ans[0] += ".#..";
}
ans[4] = ans[0];
// 위,아래에서 2번째
ans[1] = ".#.#.";
for (int i = 1; i < s.size(); i++)
{
ans[1] += "#.#.";
}
ans[3] = ans[1];
// 가운데 줄
ans[2] = "#.";
ans[2] += s[0];
ans[2] += ".#";
for (int i = 1; i < s.size(); i++)
{
ans[2] += ".";
ans[2] += s[i];
ans[2] += ".#";
}
for (int i = 0; i < 5; i++)
{
cout << ans[i] << endl;
}
}
return 0;
}