Submission #431675

# Submission time Handle Problem Language Result Execution time Memory
431675 2021-06-17T14:21:09 Z kwongweng Vision Program (IOI19_vision) C++17
0 / 100
1 ms 204 KB
#include <bits/stdc++.h>
#include "vision.h"
using namespace std;

void construct_network(int H, int W, int K) {
	vector<int> Ns;
	int a1 = H*W, a2 = H*W;
	int cnt = 0;
	for (int i = 0; i < H; i++){
		for (int j = 0; j < W; j++){
			int pos = i*W + j;
			for (int k = -K; k <= K; k++){
				int new_pos = pos + k*W + K-abs(k);
				if (i+k < H && j+K-abs(k) < W){
					Ns = {pos, new_pos};
					int a = add_and(Ns);
					cnt++;
				}
			}
		}
	}
	Ns = {};
	for (int i = H*W; i < H*W+cnt; i++) Ns.push_back(i);
	int a = add_or(Ns);
	return;
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:16:10: warning: unused variable 'a' [-Wunused-variable]
   16 |      int a = add_and(Ns);
      |          ^
vision.cpp:7:6: warning: unused variable 'a1' [-Wunused-variable]
    7 |  int a1 = H*W, a2 = H*W;
      |      ^~
vision.cpp:7:16: warning: unused variable 'a2' [-Wunused-variable]
    7 |  int a1 = H*W, a2 = H*W;
      |                ^~
vision.cpp:24:6: warning: unused variable 'a' [-Wunused-variable]
   24 |  int a = add_or(Ns);
      |      ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -