# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
120609 | imsifile | Chessboard Nonogram (FXCUP4_nonogram) | C++17 | 0 ms | 0 KiB |
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;
int r1[111];
void SolveNonogram(int N, int M, vector<vector<int>> Rclue, vector<vector<int>> Cclue) {
for(int i=0, x=0; i<M; i++){
for(int j=0; j<Rclue[0][i]; j++) r1[x++]=1;
x++;
if(!Rclue[0][i]) break;
}
for(int j=0; j<M; j++){
for(int i=0, x=1-r1[j]; i<N; i++){
for(int t=0; t<Cclue[j][i]; t++) Fill(++x, j+1);
x++;
if(!Cclue[j][i]) break;
}
}
}