Submission #423874

# Submission time Handle Problem Language Result Execution time Memory
423874 2021-06-11T13:37:43 Z aymanrs Vision Program (IOI19_vision) C++14
14 / 100
21 ms 1868 KB
#include <bits/stdc++.h> 
#include "vision.h"
using namespace std;
void construct_network(int H, int W, int K){
    vector<int> ow, xw, ad, oc, xc;
    int f = -1, l = -1;
    for(int i = 0;i < H;i++){
        vector<int> o;
        for(int j = 0;j < W;j++){
            o.push_back(i * W + j);
        }
        ow.push_back(add_or(o));
        xw.push_back(add_xor(o));
    }
    for(int j = 0;j < W;j++){
        vector<int> o;
        for(int i = 0;i < H;i++){
            o.push_back(i * W + j);
        }
        oc.push_back(add_or(o));
        xc.push_back(add_xor(o));
    }
    if(H == 1) goto noH;
    for(int i = 0;i < H-1;i++){
        ad.push_back(add_and({ow[i], ow[i+1]}));
    }
    f = add_and({add_not(add_or(xc)), add_or(ad)});
    ad.clear();
    noH:
    if(W == 1) goto noW;
    for(int i = 0;i < W-1;i++){
        ad.push_back(add_and({oc[i], oc[i+1]}));
    }
    l = add_and({add_not(add_or(xw)), add_or(ad)});
    noW:
    if(l == -1) add_or({f});
    else if(f == -1) add_or({l});
    else add_or({f, l});
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 288 KB Output is correct
2 Incorrect 1 ms 332 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 292 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 21 ms 1860 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 5 ms 460 KB Output is correct
5 Correct 1 ms 332 KB Output is correct
6 Correct 1 ms 332 KB Output is correct
7 Correct 11 ms 1112 KB Output is correct
8 Correct 14 ms 1100 KB Output is correct
9 Correct 19 ms 1868 KB Output is correct
10 Correct 1 ms 292 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -