Submission #9734

#TimeUsernameProblemLanguageResultExecution timeMemory
9734ainu7Zu (kriii2_Z)C++98
1 / 4
8 ms1808 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...