이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |