Submission #1053147

# Submission time Handle Problem Language Result Execution time Memory
1053147 2024-08-11T09:11:41 Z amirhoseinfar1385 Vision Program (IOI19_vision) C++17
0 / 100
15 ms 4188 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
int n,m;
const int maxn=400+10;

int solve(int k){
	vector<int>all0[maxn],all1[maxn],ps0,ps1;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			all0[i+j].push_back(i*m+j);
			all1[i+(m-j-1)].push_back(i*m+j);
		}
	}
	vector<int>ret;
	for(int i=k;i<=n+m-2;i++){
	//	cout<<i<<" "<<(int)all0[i-k].size()<<" "<<all1[i-k].size()<<" "<<(int)all0[i].size()<<" "<<(int)all1[i].size()<<endl;
		ps0.push_back(add_or(all0[i-k]));
		ps1.push_back(add_or(all1[i-k]));
		ret.push_back(add_and({add_or(all0[i]),add_or(ps0)}));
		ret.push_back(add_and({add_or(all1[i]),add_or(ps1)}));
	}
	return add_or(ret);
}

void construct_network(int H, int W, int fas) {
	n=H;
	m=W;
	if(fas==(n+m-2)){
		solve(fas);
	}else{
		add_and({solve(fas),add_not(fas+1)});
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 856 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 4188 KB on inputs (126, 120), (176, 169), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -