Submission #416707

# Submission time Handle Problem Language Result Execution time Memory
416707 2021-06-02T20:22:12 Z peuch Vision Program (IOI19_vision) C++17
0 / 100
1000 ms 1124 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K) {
	vector<int> finalAnswer;
	for(int i = 0; i < H * W; i++){
		for(int j = i + 1; j < H * W; j++){
			int xi = i % H, yi = i / H;
			int xj = j % H, yj = j / H;
			if(abs(xi - xj) + abs(yi - yj) == K) finalAnswer.push_back(add_and(vector<int> (2, (i, j))));
		}
	}
	add_or(finalAnswer);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:11:88: warning: left operand of comma operator has no effect [-Wunused-value]
   11 |    if(abs(xi - xj) + abs(yi - yj) == K) finalAnswer.push_back(add_and(vector<int> (2, (i, j))));
      |                                                                                        ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1084 ms 1124 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -