-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path17363.cpp
32 lines (30 loc) · 1002 Bytes
/
17363.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
#include <iostream>
using namespace std;
int main(){
int N,M; cin >> N >> M;
string first[N];
char second[M][N];
for (int i=0; i<N; i++){
cin >> first[i];
}
for (int i=0; i<N;i++){
for (int j=0; j<M;j++){
if (first[i][j] =='O') second[M-j-1][i]='O';
else if (first[i][j]=='-') second[M-j-1][i] = '|';
else if (first[i][j]=='|') second[M-j-1][i] = '-';
else if (first[i][j]=='/') second[M-j-1][i] = '\\';
else if (first[i][j]=='\\') second[M-j-1][i] = '/';
else if (first[i][j]=='^') second[M-j-1][i] = '<';
else if (first[i][j]=='<')second[M-j-1][i] ='v';
else if (first[i][j]=='v')second[M-j-1][i] ='>';
else if (first[i][j]== '>')second[M-j-1][i] = '^';
else second[M-j-1][i] =first[i][j];
}
}
for (int i=0; i<M;i++){
for(int j=0; j<N;j++){
cout << second[i][j];
}
cout << endl;
}
}