Submission #147843

#TimeUsernameProblemLanguageResultExecution timeMemory
147843Lovely Trick (#201)Chessboard Nonogram (FXCUP4_nonogram)C++17
100 / 100
8 ms640 KiB
#include "nonogram.h" using namespace std; vector<vector<int>> SolveNonogram(int N, int M, vector<vector<int>> Rclue, vector<vector<int>> Cclue) { vector<vector<int>> ans(N, vector<int>(M)); { int idx = 0; for(int x : Cclue[0]){ for(; x--; ) ans[idx++][0] = 1; idx++; } } for(int i = 0; i < N; i++){ int idx = ans[i][0] == 1 ? 0 : 1; for(int x : Rclue[i]){ for(; x--; ) ans[i][idx++] = 1; idx++; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...