제출 #9404

#제출 시각아이디문제언어결과실행 시간메모리
9404maniacZu (kriii2_Z)C++14
4 / 4
0 ms1684 KiB
#include<string> #include<vector> #include<cstdio> using namespace std; vector <string> seq = { "a","b","c","d","e","f", "g","h","i","j","kq","l", "m","n","o","p","z","r", "s","t","uv","w","x","y", "0","1","2","3","3","4","4", "5","5","6","6","7","7", "8","9","10" }; string symbol[][5] ={ { "#####", "..#..", // a "#...#", "#####", "#####", },{ "#####", "#...#", // b "#.#.#", "....#", "#####", },{ "#####", "###..", // c "###.#", "###..", "#####", },{ "#####", "#####", // d "#####", "..###", "#.###", },{ "#####", "..###", // e "#.###", "#....", "#####", },{ "#####", "#.#.#", // f "....#", "#.#.#", "#####", },{ "###.#", "##..#", // g "##.##", "##..#", "###.#", },{ "#####", "#...#", // h "#.#.#", "#...#", "###.#", },{ "#.#.#", "#...#", // i "#####", "#####", "#####", },{ "#####", "#####", // j "#####", "###..", "###.#", },{ "###.#", "###.#", // kq "###.#", "#...#", "#.###", },{ "#####", "#...#", // l "##.##", "#...#", "##.##", },{ "#####", "#####", // m "#...#", "..#..", "#####", },{ "#####", "#....", // n "#.#.#", "#...#", "#####", },{ "#####", "..###", // o "#.###", "..###", "#####", },{ "###.#", "###..", // p "#####", "#####", "#####", },{ "#####", "....#", // z "###.#", "###..", "#####", },{ "#####", "#.#.#", // r "#....", "#.#.#", "#####", },{ "#.###", "#..##", // s "##.##", "#..##", "#.###", },{ "#.###", "#...#", // t "#.#.#", "#...#", "#####", },{ "#####", "#####", // uv "#####", "#...#", "#.#.#", },{ "#.###", "..###", // w "#####", "#####", "#####", },{ "###.#", "#...#", // x "#.###", "#.###", "#.###", },{ "##.##", "#...#", // y "##.##", "#...#", "#####", },{ "#####", "#...#", // 0 "#...#", "#...#", "#####", },{ "#####", "#.#.#", // 1 "#.#.#", "#...#", "#####", },{ "#####", "#...#", // 2 "#.###", "#...#", "#####", },{ "#####", "#.#.#", // 3 "#.###", "#...#", "#####", },{ "#####", "#...#", // 3 "#.#.#", "#.#.#", "#####", },{ "#####", "#...#", // 4 "###.#", "#...#", "#####", },{ "#####", "#.#.#", // 4 "#.#.#", "#.#.#", "#####", },{ "#####", "#.#.#", // 5 "###.#", "#...#", "#####", },{ "#####", "#...#", // 5 "#.###", "#.#.#", "#####", },{ "#####", "#...#", // 6 "#####", "#...#", "#####", },{ "#####", "#.#.#", // 6 "#.###", "#.#.#", "#####", },{ "#####", "#...#", // 7 "###.#", "#.#.#", "#####", },{ "#####", "#.#.#", // 7 "#####", "#...#", "#####", },{ "#####", "#.#.#", // 8 "###.#", "#.#.#", "#####", },{ "#####", "#...#", // 9 "#####", "#.#.#", "#####", },{ "#####", "#.#.#", // 10 "#####", "#.#.#", "#####", } }; const char BLACK[] = "\x1b[47m"; const char WHITE[] = "\x1b[40m"; const char CLEAR[] = "\x1b[0m"; void Verify() // Linux Only :) { for (int i = 0; i < seq.size(); i++) { printf("%s[%s]\n", CLEAR, seq[i].c_str()); for (int y = 0; y < 5; y++) { for (int x = 0; x < 5; x++) { printf("%s ", symbol[i][y][x] == '#' ? BLACK : WHITE); } printf("%s\n", CLEAR); } getchar(); } } int r, c; char f[666][666]; const string none("_"); string go(int sy, int sx) { for (int k = 0; k < seq.size(); k++) { int flag = 1; for (int i = sy; flag && i < sy+5; i++) { for (int j = sx; flag && j < sx+5; j++) { if (f[i][j] != symbol[k][i-sy][j-sx]) flag = 0; } } if (flag) return seq[k]; } return none; } int main() { //Verify(); scanf("%d%d", &r, &c); for (int i = 0; i+1 < 6*r; i++) { scanf("%s", f[i]); } vector <string> str; for (int i = 0; i+1 < 6*r; i+=6) { for (int j = 0; j+1 < 6*c; j+=6) { str.push_back(go(i, j)); } } for (int i = c-1; i >= 0; i--) { for (int j = 0; j < r; j++) { printf("%s", str[i+j*c].c_str()); } puts(""); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...