-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path17363.cpp
More file actions
57 lines (54 loc) · 725 Bytes
/
17363.cpp
File metadata and controls
57 lines (54 loc) · 725 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
57
// 17363. 우유가 넘어지면?
// 2019.07.29
// 구현
#include<iostream>
using namespace std;
char map[101][101];
// 문제에서 주어진 대로 변환
char Change(char c)
{
switch (c)
{
case 'O':
return 'O';
case '-':
return '|';
case '|':
return '-';
case '/':
return '\\';
case '\\':
return '/';
case '^':
return '<';
case '<':
return 'v';
case 'v':
return '>';
case '>':
return '^';
default:
return '.';
}
}
int main()
{
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> map[i][j];
}
}
for (int i = m - 1; i >= 0; i--)
{
for (int j = 0; j < n; j++)
{
cout << Change(map[j][i]);
}
cout << endl;
}
return 0;
}