# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9398 |
2014-09-28T06:09:23 Z |
kcm1700 |
Zu (kriii2_Z) |
C++14 |
|
0 ms |
1396 KB |
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
using namespace std;
char dat[400][400];
char empty[5][6]=
{
".....",
".....",
".....",
".....",
"....."
};
char A[5][6]=
{
"#####",
"..#..",
"#...#",
"#####",
"#####"
};
char B[5][6]=
{
"#####",
"#...#",
"#.#.#",
"....#",
"#####"
};
char C[5][6]=
{
"#####",
"###..",
"###.#",
"###..",
"#####"
};
char D[5][6]=
{
"#####",
"#####",
"#####",
"..###",
"#.###"
};
bool cmp(int r, int c, char v[5][6]) {
for(int i = 0; i < 5; i++) {
for(int j = 0; j < 5; j++) {
if (v[i][j] != dat[r+i][c+j]) return false;
}
}
return true;
}
string decode(int r, int c) {
if (cmp(r,c,empty)) return "_";
if (cmp(r,c,A)) return "a";
if (cmp(r,c,B)) return "b";
if (cmp(r,c,C)) return "c";
if (cmp(r,c,D)) return "d";
return "z";
}
int main(){
int r,c;
scanf("%d%d",&r,&c);
for(int i = 0; i < 6*r-1; i++) {
scanf("%s",dat[i]);
}
for(int i = 0; i < c; i++) {
for(int j = 0; j < r; j++) {
string res = decode(j*6, (c-i-1)*6);
printf("%s",res.c_str());
}
printf("\n");
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1396 KB |
Output isn't correct |