| 51 | } |
| 52 | |
| 53 | int main() |
| 54 | { |
| 55 | ofstream fout(getenv("OUTPUT_PATH")); |
| 56 | |
| 57 | string HW_temp; |
| 58 | getline(cin, HW_temp); |
| 59 | |
| 60 | vector<string> HW = split_string(HW_temp); |
| 61 | |
| 62 | int H = stoi(HW[0]); |
| 63 | |
| 64 | int W = stoi(HW[1]); |
| 65 | |
| 66 | vector<vector<int>> A(H); |
| 67 | for (int i = 0; i < H; i++) { |
| 68 | A[i].resize(W); |
| 69 | |
| 70 | for (int j = 0; j < W; j++) { |
| 71 | cin >> A[i][j]; |
| 72 | } |
| 73 | |
| 74 | cin.ignore(numeric_limits<streamsize>::max(), '\n'); |
| 75 | } |
| 76 | |
| 77 | int result = surfaceArea(A); |
| 78 | |
| 79 | fout << result << "\n"; |
| 80 | |
| 81 | fout.close(); |
| 82 | |
| 83 | return 0; |
| 84 | } |
| 85 | |
| 86 | vector<string> split_string(string input_string) { |
| 87 | string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) { |
nothing calls this directly
no test coverage detected