답안 #153421

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
153421 2019-09-14T07:26:16 Z myungwoo Vision Program (IOI19_vision) C++14
0 / 100
5 ms 1268 KB
#include <bits/stdc++.h>
#include "vision.h"
using namespace std;

int num[201][201];

void construct_network(int H, int W, int K)
{
	int idx = 0;
	for (int i=1;i<=H;i++) for (int j=1;j<=W;j++) num[i][j] = idx++;
	vector <int> or_arr;
	for (int i=1;i<=H;i++) for (int j=1;j<=W;j++){
		vector <int> xor_arr;
		for (int dy=-K;dy<=K;dy++){
			for (int sx=-1;sx<2;sx+=2){
				int dx = sx*(K-abs(dy));
				int y = i+dy, x = j+dx;
				if (y < 1 || y > H || x < 1 || x > W) continue;
				xor_arr.push_back(num[y][x]);
			}
		}
		if (xor_arr.empty()) continue;
		int x = add_xor(xor_arr);
		or_arr.push_back(add_and({x, num[i][j]}));
	}
	add_or(or_arr);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 296 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 256 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 296 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 256 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 296 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 256 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 296 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 256 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 3 ms 432 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 2 ms 360 KB Output is correct
5 Incorrect 2 ms 504 KB on inputs (0, 0), (2, 0), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 348 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 1268 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 296 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 256 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -