# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
19215 | | joonas | Zu (kriii2_Z) | C++98 | | 12 ms | 1852 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define NUMBER_OF_GLYPHIC 10
string mapping[NUMBER_OF_GLYPHIC][5]={
{ // _
".....",
".....",
".....",
".....",
"....."
},
{ // 3
"#####",
"#.#.#",
"#.###",
"#...#",
"#####"
},
{ // 3 (2)
"#####",
"#...#",
"#.#.#",
"#.#.#",
"#####"
},
{ // 10
"#####",
"#.#.#",
"#####",
"#.#.#",
"#####"
},
{ // a
"#####",
"..#..",
"#...#",
"#####",
"#####"
},
{ // b
"#####",
"#...#",
"#.#.#",
"....#",
"#####"
},
{ // c
"#####",
"###..",
"###.#",
"###..",
"#####"
},
{ // d
"#####",
"#####",
"#####",
"..###",
"#.###"
},
{ // kq
"###.#",
"###.#",
"###.#",
"#...#",
"#.###"
},
{ // uv
"#####",
"#####",
"#####",
"#...#",
"#.#.#"
}
};
string encode[NUMBER_OF_GLYPHIC]={
"_","3","3","10","a","b","c","d","kq","uv"
};
string finder(string s[], int y, int x){
for(int idx=0; idx<NUMBER_OF_GLYPHIC; ++idx){
bool isSame = true;
for(int i=0; i<5; ++i)
isSame &= s[y+i].substr(x, 5) == mapping[idx][i];
if(isSame) return encode[idx];
}
return "z";
}
int main(){
string s[350];
int i, j, k, r, c;
cin >> r >> c;
for(i=0; i<6*r-1; ++i) cin >> s[i];
for(j=6*(c-1); j>=0; j -= 6){
for(i=0; i<6*r; i += 6){
cout<< finder(s, i, j);
}
cout<<'\n';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |