Submission #152175

# Submission time Handle Problem Language Result Execution time Memory
152175 2019-09-06T16:55:09 Z stefdasca Vision Program (IOI19_vision) C++14
0 / 100
12 ms 1144 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K)
{
    int query_number = H * W - 1;
    for(int i = 0; i < H; ++i)
    {
        vector<int>pz;
        for(int a = i, b = 0; a < H && b < W; ++a, ++b)
            pz.push_back(a * W + b);
        add_xor(pz);
        ++query_number;
    }
    for(int i = 1; i < W; ++i)
    {
        vector<int>pz;
        for(int a = 0, b = i; a < H && b < W; ++a, ++b)
            pz.push_back(a * W + b);
        add_xor(pz);
        ++query_number;
    }
    int q3 = query_number - 1;
    for(int i = 0; i < H; ++i)
    {
        vector<int>pz;
        for(int a = 0, b = i; a < H && b >= 0; ++a, --b)
            pz.push_back(a * W + b);
        add_xor(pz);
        ++q3;
    }
    for(int i = 1; i < W; ++i)
    {
        vector<int>pz;
        for(int a = i, b = W - 1; a < H && b >= 0; ++a, --b)
            pz.push_back(a * W + b);
        add_xor(pz);
        ++q3;
    }
    int total = q3;
    vector<int>lst;
    while(q3 - K > query_number)
    {
        ++total;
        lst.push_back(total);
        add_and({q3, q3 - K});
        --q3;
    }
    while(query_number - K >= H * W)
    {
        ++total;
        lst.push_back(total);
        add_and({query_number, query_number - K});
        --query_number;
    }
    add_or(lst);
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 392 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 1144 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 2 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -