Submission #165965

# Submission time Handle Problem Language Result Execution time Memory
165965 2019-11-29T21:33:47 Z nickmet2004 Vision Program (IOI19_vision) C++14
0 / 100
21 ms 19576 KB
#include<bits/stdc++.h>
#include<vision.h>

using namespace std;

int h , w , k;

vector<int> Dl[400500] , Dr[400500];

int solve(int h , int w , int K){
    for(int i = 0; i < h; ++i){
        for(int j = 0; j < w; ++j){
            // emplace back the elements on diagonals , position off memory array
            Dl[i - j].push_back(i * w + j);
            Dr[i + j + h - 1].push_back(i * w + j);
        }
    }
    vector<int> DiagLor , DiagRor , ans;
    for(int i = 0; i <= h + w - 2; ++i){
        DiagLor.push_back(add_or(Dl[i]));
        DiagRor.emplace_back(add_or(Dr[i]));
        if(i >= K){
            ans.push_back( add_and ( { DiagLor[i] , DiagLor[i - K] } ) );
            ans.push_back( add_and ( { DiagRor[i] , DiagRor[i - K] } ) );
        }
    }
    return add_or(ans);
}

void construct_network(int H , int W , int K){
    if(H + W - 2 == K){
        solve(H , W , K);
    } else {
        add_xor( { solve(H , W , K) , solve(H , W , K + 1) } );
    }
}
//int main(){}

# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 19576 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 19064 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -