Created
July 31, 2019 05:33
-
-
Save surinoel/4989828566a5238c93ec7e757f75ab38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <map> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
char mat[100][100]; | |
int main(void) { | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
map<char, char> mp; | |
mp['.'] = '.'; | |
mp['O'] = 'O'; | |
mp['-'] = '|'; | |
mp['|'] = '-'; | |
mp['/'] = '\\'; | |
mp['\\'] = '/'; | |
mp['^'] = '<'; | |
mp['<'] = 'v'; | |
mp['v'] = '>'; | |
mp['>'] = '^'; | |
int n, m; | |
cin >> n >> m; | |
for (int i = 0; i < n; i++) { | |
for (int j = 0; j < m; j++) { | |
cin >> mat[i][j]; | |
} | |
} | |
for (int i = m - 1; i >= 0; i--) { | |
for (int j = 0; j < n; j++) { | |
cout << mp[mat[j][i]]; | |
} | |
cout << '\n'; | |
} | |
cout << '\n'; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment