# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9734 |
2014-09-28T08:30:34 Z |
ainu7 |
Zu (kriii2_Z) |
C++ |
|
8 ms |
1808 KB |
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <set>
using namespace std;
string analyze(vector<string> part) {
string res;
if (part[1] == ".....") return res = "_";
if (part[1] == "..#.." && part[2] == "#...#") return res = "a";
if (part[1] == "#...#" && part[2] == "#.#.#" && part[3] == "....#") return res = "b";
if (part[1] == "###.." && part[2] == "###.#" && part[3] == "###..") return res = "c";
if (part[1] == "#####" && part[2] == "#####" && part[3] == "..###") return res = "d";
return res = "z";
}
int main()
{
int R, C;
cin >> R >> C;
vector<string> str(6*R-1);
for (int i=0; i<6*R-1; i++)
cin >> str[i];
for (int i=C-1; i>=0; i--) {
for (int j=0; j<R; j++) {
vector<string> part;
for (int k=0; k<5; k++)
part.push_back(str[6*j+k].substr(i*6, 5));
string res = analyze(part);
cout << res;
}
cout << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
1808 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
1808 KB |
Output isn't correct |