답안 #198763

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
198763 2020-01-27T14:20:41 Z Akashi Vision Program (IOI19_vision) C++14
0 / 100
7 ms 1140 KB
#include <bits/stdc++.h>
#include "vision.h"
 
using namespace std;
 
bool viz[205][205];
int wh[205][205];
 
void construct_network(int H, int W, int K) {
	vector <int> v;
 
	int Last = 0;
	for(int i = 0; i < H ; ++i){
		for(int j = 0; j < W ; ++j){
			viz[i][j] = 1;
			v.clear();
	
			for(int x = -K; x <= 0 ; ++x){
				int y = K - abs(x);
				int l = i + x, c = j + y; 
		
				if(l >= 0 && c >= 0 && l < H && c < W){
					if(!viz[l][c]) v.push_back(l * W + c);
				}
				
				y = -y;
				l = i + x, c = j + y; 
		
				if(l >= 0 && c >= 0 && l < H && c < W){
					if(!viz[l][c]) v.push_back(l * W + c);
				}
			}
	
			if(v.size() == 0) continue ;
			wh[i][j] = add_or(v);
			Last = wh[i][j];
		}
	}
	
	int st = Last + 1, dr = 0;
	for(int i = 0; i < H ; ++i){
		for(int j = 0; j < W ; ++j){
			if(wh[i][j]){
				vector <int> v;
				v.push_back(i * W + j);
				v.push_back(wh[i][j]);
				dr = add_and(v);
			}
		}
	}
	
	v.clear();
	for(int i = st; i <= dr ; ++i) v.push_back(i);
	add_or(v);
 
	return ;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 376 KB Output is correct
2 Correct 6 ms 376 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 376 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 1140 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Incorrect 5 ms 376 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -