Submission #673111

# Submission time Handle Problem Language Result Execution time Memory
673111 2022-12-19T18:07:36 Z tbzard Vision Program (IOI19_vision) C++14
0 / 100
326 ms 212 KB
#include <bits/stdc++.h>
using namespace std;

int add_not(int n);
int add_and(vector<int> ns);
int add_or(vector<int> ns);
int add_xor(vector<int> ns);
void construct_network(int h, int w, int k){
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            for(int a=i+1;a<h;a++){
                for(int b=j+1;b<w;b++){
                    if(abs(i-a) + abs(j-b) == k){
                        int out = add_and(vector<int>{i*w+j, a*w+b});
                    }
                }
            }
        }
    }
    add_xor(vector<int>{0});
    add_or(vector<int>{0});
    add_not(0);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:14:29: warning: unused variable 'out' [-Wunused-variable]
   14 |                         int out = add_and(vector<int>{i*w+j, a*w+b});
      |                             ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 326 ms 212 KB on inputs (126, 120), (176, 169), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -