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 "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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |