Submission #165969

# Submission time Handle Problem Language Result Execution time Memory
165969 2019-11-29T22:41:45 Z nickmet2004 Vision Program (IOI19_vision) C++14
0 / 100
6 ms 4248 KB
#include<bits/stdc++.h>
#include "vision.h"

using namespace std;
 
int solve(int h , int w , int K){
 
    vector<int> Dl[40050] , Dr[40050];
    for(int i = 0; i < h; ++i){
        for(int j = 0; j < w; ++j){
            // emplace back the elements on diagonals , position off memory array
            Dl[i - j].push_back(i * w + j);
            Dr[i + j + w - 1].push_back(i * w + j);
        }
    }
    
	vector<int> DiagLor , DiagRor , ans;
 
	for(int i = 0; i <= h + w - 2; i++){
		DiagLor.push_back(add_or(Dl[i]));
		DiagRor.push_back(add_or(Dr[i]));
		if(i >= K){
			ans.push_back( add_and( { DiagLor[i] , DiagLor[i - K] } ) );
			ans.push_back( add_and( { DiagRor[i] , DiagRor[i - K] } ) );
		}
	}
	return add_or(ans);
}
 
void construct_network(int H , int W , int K) {
	if(H + W - 2 == K){
        solve(H , W , K);
	}
	else {
        add_xor( {solve(H , W , K), solve(H , W , K + 1) } );
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2168 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2168 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2168 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2168 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 4216 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2140 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 4248 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2168 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -