Submission #299484

# Submission time Handle Problem Language Result Execution time Memory
299484 2020-09-15T03:25:21 Z TMJN Vision Program (IOI19_vision) C++17
0 / 100
7 ms 1404 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K) {
	vector<int>h,w,v;
	int h_xor,w_xor;
	for(int i=0;i<H;i++){
		vector<int>t;
		for(int j=0;j<W;j++){
			t.push_back(H*i+j);
		}
		h.push_back(add_or(t));
	}
	h_xor=add_xor(h);
	for(int i=0;i<W;i++){
		vector<int>t;
		for(int j=0;j<H;j++){
			t.push_back(H*j+i);
		}
		w.push_back(add_or(t));
	}
	w_xor=add_xor(w);
	for(int i=0;i<H;i++){
		for(int j=i+1;j<H;j++){
			for(int k=0;k<W;k++){
				int l=K-(j-i)+k;
				if(l<=k||W<=l)continue;
				v.push_back(add_and({h[i],h[j],w[k],w[l]}));
			}
		}
	}
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			int k=j+K;
			if(k<=j||W<=k)continue;
			v.push_back(add_and({h_xor,h[i],w[j],w[k]}));
		}
	}
	for(int i=0;i<W;i++){
		for(int j=0;j<H;j++){
			int k=j+K;
			if(k<=j||H<=k)continue;
			v.push_back(add_and({w_xor,w[i],h[j],h[k]}));
		}
	}
	add_xor(v);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 512 KB Output is correct
5 Incorrect 1 ms 256 KB WA in grader: Invalid index
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 1404 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB WA in grader: Invalid index
4 Halted 0 ms 0 KB -