답안 #147548

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
147548 2019-08-30T02:18:36 Z imsifile 체스판 네모네모로직 (FXCUP4_nonogram) C++17
0 / 100
5 ms 384 KB
#include "nonogram.h"
using namespace std;
 
int r1[111];
 
vector<vector<int>> SolveNonogram(int N, int M, vector<vector<int>> Rclue, vector<vector<int>> Cclue) {
	vector<vector<int>> ans;
	ans.resize(N);
	for(int i=0; i<N; i++) ans[i].resize(M,0);
	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++) ans[++x][j+1]=1;
			x++;
			if(!Cclue[j][i]) break;
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 5 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 5 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -