답안 #165953

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
165953 2019-11-29T19:48:04 Z lukameladze Vision Program (IOI19_vision) C++14
0 / 100
58 ms 10576 KB
# include <bits/stdc++.h>
# include "vision.h"
using namespace std;

int ans(int H, int W, int K)
{
	vector<int >d1[100005],d2[100005],x1,x2,y11,y2,xx1,xx2,yy1,yy2,v,vv,v1;
	for (int i=0; i<H; i++)
	{
		for (int j=0; j<W; j++)
		{
			d1[i+j].push_back(i*W+j);
			d2[i-j+W-1].push_back(i*W+j);
		}
	}
	for (int i=0; i<H+W-1; i++)
	{
		x1.push_back(add_or(d1[i]));
		y11.push_back(add_or(d2[i]));
		x2.push_back(add_or(x1));
		y2.push_back(add_or(y11));
		if (i>=K)
		{
			v.push_back(add_and({x1[i],x2[i-K]}));
			v.push_back(add_and({y11[i],y2[i-K]}));
		}		
	}
	for (int i=0; i<H+W-1; i++)
	{
		xx1.push_back(add_or(d1[i]));
		yy1.push_back(add_or(d2[i]));
		xx2.push_back(add_or(xx1));
		yy2.push_back(add_or(yy1));
		if (i>=K+1)
		{
			vv.push_back(add_and({xx1[i],xx2[i-K-1]}));
			vv.push_back(add_and({yy1[i],yy2[i-K-1]}));
		}		
	}
	return add_xor({add_or(v), add_or(vv)});
}
void construct_network(int H, int W, int K)
{
	ans(H,W,K);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 5880 KB Output is correct
2 Correct 15 ms 5880 KB Output is correct
3 Correct 15 ms 5940 KB Output is correct
4 Incorrect 6 ms 5496 KB WA in grader: Instruction with no inputs
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 58 ms 10576 KB Output is correct
2 Correct 6 ms 4984 KB Output is correct
3 Correct 12 ms 5624 KB Output is correct
4 Correct 18 ms 6136 KB Output is correct
5 Correct 15 ms 5880 KB Output is correct
6 Correct 15 ms 5884 KB Output is correct
7 Correct 34 ms 8056 KB Output is correct
8 Correct 35 ms 8020 KB Output is correct
9 Correct 58 ms 10484 KB Output is correct
10 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 4984 KB Output is correct
2 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -