Submission #408763

# Submission time Handle Problem Language Result Execution time Memory
408763 2021-05-19T15:30:17 Z rumen_m Vision Program (IOI19_vision) C++17
0 / 100
14 ms 1732 KB
#include "vision.h"
using namespace std;
int bits[11];
int rows[205],col[205];
vector <int> mv(int a, int b=-1)
{
    vector <int> w;
    w.push_back(a);
    w.push_back(b);
    return w;
}
void add(int delta)
{
    int ost = delta;
    for(int i=0;i<10;i++)
    {
        int newid = add_xor(mv(ost,bits[i]));
        ost = add_and(mv(ost,bits[i]));
        bits[i] = newid;
    }
}
void construct_network(int H, int W, int K) {
	vector<int> w;
	int i;
	int zero = add_and(mv(add_not(0),0));
	for(i=0;i<10;i++)bits[i] = add_and(mv(zero,0));
	int curr = zero;
	for(i=0;i<H;i++)
    {
        w.clear();
        w.push_back(curr);
        for(int j=0;j<W;j++)
        {
            w.push_back(i*W+j);
        }
        curr = add_xor(w);
        add(curr);
    }
    curr = zero;
    for(i=0;i<W;i++)
    {
        w.clear();
        w.push_back(curr);
        for(int j=0;j<H;j++)
        {
            w.push_back(j*W+i);
        }
        curr = add_xor(w);
        add(curr);
    }
    curr = zero;
    w.clear();
    w.push_back(curr);
    for(i=0;i<10;i++)
    {
        if((1<<i)&K)
        {
            w.push_back(bits[i]);
        }
        else
            w.push_back(add_not(bits[i]));
    }
    add_and(w);
    return ;

}
# Verdict Execution time Memory Grader output
1 Incorrect 1 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 1 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 1 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 1 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 3 ms 588 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 1 ms 288 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 14 ms 1732 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -