Submission #152149

# Submission time Handle Problem Language Result Execution time Memory
152149 2019-09-06T15:43:19 Z stefdasca Vision Program (IOI19_vision) C++14
0 / 100
34 ms 2168 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K)
{
    /*
	vector<int> Ns;
	Ns = {0, 1};
	int a = add_and(Ns);
	Ns = {0, a};
	int b = add_or(Ns);
	Ns = {0, 1, b};
	int c = add_xor(Ns);
	add_not(c);
	*/
	for(int i = 0; i < H; ++i)
        for(int j = 0; j < W; ++j)
            add_and({i * W + j});
    bool sk[303][303];
    memset(sk, 0, sizeof(sk));
	for(int i = 0; i < H; ++i)
        for(int j = 0; j < W; ++j)
        {
            vector<int>vec;
            for(int q = 0; q < H; ++q)
                for(int z = 0; z < W; ++z)
                    if(abs(i - q) + abs(j - z) == K)
                        vec.push_back(q * W + z);
            if(!vec.size())
                add_and({i * W + j}), sk[i][j] = 1;
            else
                add_or(vec);
        }
    int p1 = H * W;
    int p2 = H * W * 2;
    int qu = H * W * 3;
    for(int i = 0; i < H; ++i)
        for(int j = 0; j < W; ++j)
            if(!sk[i][j])
                add_and({p1, p2}), ++p1, ++p2, ++qu;
    vector<int>s;
    for(int i = H * W * 3; i < qu; ++i)
        s.push_back(i);
    add_or(s);
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 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 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 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 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 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 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 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 2 ms 504 KB Output is correct
2 Correct 3 ms 504 KB Output is correct
3 Incorrect 3 ms 504 KB on inputs (0, 0), (0, 99), expected 0, but computed 1
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 20 ms 1268 KB Output is correct
4 Correct 34 ms 2168 KB Output is correct
5 Correct 28 ms 1648 KB Output is correct
6 Correct 21 ms 1140 KB Output is correct
7 Incorrect 17 ms 884 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1140 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -