# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
9734 | | ainu7 | Zu (kriii2_Z) | C++98 | | 8 ms | 1808 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 <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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |