Submission #208011

# Submission time Handle Problem Language Result Execution time Memory
208011 2020-03-09T18:46:08 Z Lawliet Vision Program (IOI19_vision) C++14
0 / 100
191 ms 1132 KB
#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

int n, m;

int getCell(int i, int j) { return i*m + j; }

void construct_network(int H, int W, int K) 
{
	n = H; m = W;

	vector< int > q;
	vector< int > all;

	int curInd = H*W - 1;

	for(int curX = 0 ; curX < n ; curX++)
	{
		for(int curY = 0 ; curY < m ; curY++)
		{
			vector< int > q;

			for(int x = 0 ; x < n ; x++)
			{
				for(int y = 0 ; y < m ; y++)
				{
					int dx = abs( x - curX );
					int dy = abs( y - curY );

					if( dx + dy == K )
						q.push_back( getCell( x , y ) ); 
				}
			}

			q.push_back( getCell( curX , curY ) );

			add_or( q );//curInd + 1
			add_xor( q );//curInd + 2

			vector< int > aux;

			aux.push_back( curInd + 1 );
			aux.push_back( curInd + 2 );

			add_xor( aux );

			all.push_back( curInd + 3 );

			curInd += 3;
		}
	}

	add_or( all );
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 408 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 256 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 191 ms 1132 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -