Submission #1048592

# Submission time Handle Problem Language Result Execution time Memory
1048592 2024-08-08T08:34:30 Z TahirAliyev Vision Program (IOI19_vision) C++17
0 / 100
1 ms 1236 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K){
	vector<int> id;
	int t = H * W - 1;
	for(int i = 0; i < H; i++){
		for(int j = 0; j < W; j++){
			vector<int> v;
			for(int k = 0; k <= K; k++){
				int x = i + k, y = j + K - k;
				if(!(x < 0 || x >= H || y < 0 || y >= W)) v.push_back(x * W + y);
				x = i + k, y = j - (K - k);
				if(!(x < 0 || x >= H || y < 0 || y >= W)) v.push_back(x * W + y);
			}
			v.resize(unique(v.begin(), v.end()) - v.begin());
			t++;
			add_or(v);
			add_and({i * W + j, t++});
			id.push_back(t);
		}
	}
	add_or(id);
	return;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 1236 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -