| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 9625 | corea | Zu (kriii2_Z) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main() {
map<vector<string>, string > M;
M[ {"#####",
"..#..",
"#...#",
"#####",
"#####"} ] = "a";
M[ {"#####",
"#...#",
"#.#.#",
"....#",
"#####"} ] = "b";
M[ {"#####",
"###..",
"###.#",
"###..",
"#####"} ] = "c";
M[ {"#####",
"#####",
"#####",
"..###",
"#.###"} ] = "d";
M[ {"#####",
"..###",
"#.###",
"#....",
"#####"} ] = "e";
M[ {"#####",
"#.#.#",
"....#",
"#.#.#",
"#####"} ] = "f";
M[ {"###.#",
"##..#",
"##.##",
"##..#",
"###.#"} ] = "g";
M[ {"#####",
"#...#",
"#.#.#",
"#...#",
"###.#"} ] = "h";
M[ {"#.#.#",
"#...#",
"#####",
"#####",
"#####"} ] = "i";
M[ {"#####",
"#####",
"#####",
"###..",
"###.#"} ] = "j";
M[ {"###.#",
"###.#",
"###.#",
"#...#",
"#.###"} ] = "kq";
M[ {"#####",
"#...#",
"##.##",
"#...#",
"##.##"} ] = "l";
M[ {"#####",
"#####",
"#...#",
"..#..",
"#####"} ] = "m";
M[ {"#####",
"#....",
"#.#.#",
"#...#",
"#####"} ] = "n";
M[ {"#####",
"..###",
"#.###",
"..###",
"#####"} ] = "o";
M[ {"###.#",
"###..",
"#####",
"#####",
"#####"} ] = "p";
M[ {"#####",
"....#",
"###.#",
"###..",
"#####"} ] = "z";
M[ {"#####",
"#.#.#",
"#....",
"#.#.#",
"#####"} ] = "r";
M[ {"#.###",
"#..##",
"##.##",
"#..##",
"#.###"} ] = "s";
M[ {"#.###",
"#...#",
"#.#.#",
"#...#",
"#####"} ] = "t";
M[ {"#####",
"#####",
"#####",
"#...#",
"#.#.#"} ] = "uv";
M[ {"#.###",
"..###",
"#####",
"#####",
"#####"} ] = "w";
M[ {"###.#",
"#...#",
"#.###",
"#.###",
"#.###"} ] = "x";
M[ {"##.##",
"#...#",
"##.##",
"#...#",
"#####"} ] = "y";
M[ {"#####",
"#...#",
"#...#",
"#...#",
"#####"} ] = "0";
M[ {"#####",
"#.#.#",
"#.#.#",
"#...#",
"#####"} ] = "1";
M[ {"#####",
"#...#",
"#.###",
"#...#",
"#####"} ] = "2";
M[ {"#####",
"#...#",
"#.#.#",
"#.#.#",
"#####"} ] = "3";
M[ {"#####",
"#.#.#",
"#.###",
"#...#",
"#####"} ] = "3";
M[ {"#####",
"#...#",
"###.#",
"#...#",
"#####"} ] = "4";
M[ {"#####",
"#.#.#",
"#.#.#",
"#.#.#",
"#####"} ] = "4";
M[ {"#####",
"#...#",
"#.###",
"#.#.#",
"#####"} ] = "5";
M[ {"#####",
"#.#.#",
"###.#",
"#...#",
"#####"} ] = "5";
M[ {"#####",
"#...#",
"#####",
"#...#",
"#####"} ] = "6";
M[ {"#####",
"#.#.#",
"#.###",
"#.#.#",
"#####"} ] = "6";
M[ {"#####",
"#...#",
"###.#",
"#.#.#",
"#####"} ] = "7";
M[ {"#####",
"#.#.#",
"#####",
"#...#",
"#####"} ] = "7";
M[ {"#####",
"#.#.#",
"###.#",
"#.#.#",
"#####"} ] = "8";
M[ {"#####",
"#...#",
"#####",
"#.#.#",
"#####"} ] = "9";
M[ {"#####",
"#.#.#",
"#####",
"#.#.#",
"#####"} ] = "10";
M[ {".....",
".....",
".....",
".....",
"....."} ] = "_";
int n, m;
cin >> n >> m;
vector<string> a(6 * n - 1);
for(int i=0; i<6*n - 1; ++i) {
cin >> a[i];
}
auto extract = [&](int i, int j) {
vector<string> s;
for(int k=i; k<i+5; ++k) {
s.push_back( a[k].substr(j, 5) );
}
return s;
};
for(int j = m - 1; j >= 0; -- j) {
for(int i = 0; i < n; ++ i) {
vector<string> e = extract(i * 6, j * 6);
// for(string &z : e) cout << z << endl; cout << endl;
cout << M[e];
}
cout << endl;
}
return 0;
}
