Submission #165951

# Submission time Handle Problem Language Result Execution time Memory
165951 2019-11-29T19:44:17 Z lukameladze Vision Program (IOI19_vision) C++14
0 / 100
9 ms 6648 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]}));
		}		
	}
	return add_or(v);	
}
int ans1(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+W-1; i++)
	{
		xx1.push_back(add_or(d1[i]));
		yy1.push_back(add_or(d2[i]));
		xx2.push_back(add_or(x1));
		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_or(vv);
}
void construct_network(int H, int W, int K)
{
	add_xor({ans(H,W,K),ans1(H,W,K)});
}
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 5240 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 6648 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 4984 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -