답안 #554714

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
554714 2022-04-29T09:21:23 Z slime Vision Program (IOI19_vision) C++14
0 / 100
10 ms 1108 KB
#include "bits/stdc++.h"
#include "vision.h"
void construct_network(int H, int W, int K) {
	std::vector<int> Ns;
  std::vector<int> rows, cols;
  for(int i=0; i<H; i++) {
    Ns.clear();
    for(int j=0; j<W; j++) {
      Ns.push_back(i*W + j);
    }
    rows.push_back(add_or(Ns));
  }
  for(int i=0; i<W; i++) {
    Ns.clear();
    for(int j=0; j<H; j++) {
      Ns.push_back(j*W + i);
    }
    cols.push_back(add_or(Ns));
  }
  std::vector<int> analyze;
  for(int i=1; i<rows.size(); i++) {
    Ns.clear();
    Ns = {rows[i-1], rows[i]};
    analyze.push_back(add_and(Ns));
  }
  for(int i=1; i<cols.size(); i++) {
    Ns.clear();
    Ns = {cols[i-1], cols[i]};
    analyze.push_back(add_and(Ns));
  }
  add_xor(analyze);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:21:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |   for(int i=1; i<rows.size(); i++) {
      |                ~^~~~~~~~~~~~
vision.cpp:26:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |   for(int i=1; i<cols.size(); i++) {
      |                ~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 304 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 304 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 304 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 304 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 304 KB Output is correct
2 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 10 ms 1108 KB on inputs (57, 107), (59, 108), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 304 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -