답안 #1048578

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1048578 2024-08-08T08:28:57 Z aykhn Vision Program (IOI19_vision) C++17
14 / 100
5 ms 1176 KB
#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

void construct_network(int H, int W, int K) 
{
	vector<int> rw(H), cl(W);
	vector<int> conr(H - 1), conc(W - 1);
	for (int i = 0; i < H; i++) 
	{
		vector<int> v;
		for (int j = 0; j < W; j++) v.push_back(i * W + j);
		rw[i] = add_xor(v);
		if (i) conr[i - 1] = add_and({rw[i], rw[i - 1]});
	}
	for (int j = 0; j < W; j++)
	{
		vector<int> v;
		for (int i = 0; i < H; i++) v.push_back(i * W + j);
		cl[j] = add_xor(v);
		if (j) conc[j - 1] = add_and({cl[j], cl[j - 1]});
	}
	if (H == 1)
	{
		add_or(conc);
	}
	else if (W == 1)
	{
		add_or(conr);
	}
	else if (H > 1 && W > 1)
	{
		int A = add_or(rw), B = add_or(cl);
		int x = add_and({add_not(A), add_or(conc)});
		int y = add_and({add_not(B), add_or(conr)});
		add_or({x, y});
	}
	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 1116 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 3 ms 860 KB Output is correct
8 Correct 3 ms 860 KB Output is correct
9 Correct 4 ms 1176 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -