Submission #837299

# Submission time Handle Problem Language Result Execution time Memory
837299 2023-08-25T09:26:49 Z Trumling Vision Program (IOI19_vision) C++14
0 / 100
2 ms 976 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std; 

typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
#define INF 99999999999999999
#define MOD 1000000007
#define all(x) x.begin(),x.end()

void construct_network(int H, int W, int K) 
{
	
	ll idx=0;
	for(int i=0;i<H;i++)
		for(int j=0;j<W;j++)
			{
				vector<int>Ns;
				Ns.pb(i*W+j);

				add_and({i*W+j});
				
				int curr=K;
				while(curr>=0)
				{
					if(j+curr>=W || i+(K-curr)>=H)
					{
						curr--;
						continue;
					}
	
					Ns.pb(W*(i+K-curr)+j+curr);
					curr--;
				}
				curr=1;
				while(curr<K)
				{
					if(j-curr<0 || i+(K-curr)>=H)
					{
						curr++;
						continue;
					}
					Ns.pb(W*(i+K-curr)+j+curr);
					idx++;
					curr++;
				}
				add_xor(Ns);
				add_not(idx+1);
				idx+=3;
			}
	vector<int>ans;
	ll idxn=0;
	for(int i=W*H;i<W*H+idx;i+=3)
	{
		add_and({i,i+2});
		idxn++;
	}
		

	for(int i=W*H+idx;i<W*H+idx+idxn;i++)
	ans.pb(i);

	add_or(ans);
		
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 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 1 ms 212 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 1 ms 212 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 1 ms 212 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 1 ms 340 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 1 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 976 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -