Submission #291711

# Submission time Handle Problem Language Result Execution time Memory
291711 2020-09-05T17:14:59 Z medmdg Vision Program (IOI19_vision) C++14
12 / 100
1 ms 384 KB
#include<bits/stdc++.h>
#include "vision.h"
using namespace std;
vector<int> DT(int H,int W,int i,int K){
    vector<int> ans;
    for(int j=i+K;j<H*W-K;j++){
        if(abs(j%W-i%W)+abs(j/W-i/W)==K){
            ans.push_back(j);
        }
    }
    return ans;
}
void construct_network(int H, int W, int K){
    vector<int> b;
    b.push_back(0);
    b.push_back(1);
    if(H*W>2)
        b.push_back(2);
    int l=add_and(b);
    b.pop_back();
    b.pop_back();
    if(b.size())
        b.pop_back();
    b.push_back(l);
    if(H*W==2){
        if(K==1)
            return;
        else
            l=add_not(0);
        return;
    }
    if(min(H,W)==1){
        for(int i=0;i<H*W-K;i++){
            vector<int> ans;
            ans.push_back(i);
            ans.push_back(i+K);
            l=add_and(ans);
            ans.pop_back();
            ans.pop_back();
            ans.push_back(l-1);
            ans.push_back(l);
            l=add_or(ans);
        }
        return;
    }
    if(max(H,W)<=100){
        for(int i=0;i<H*W-K;i+=2){
            vector<int> ans;
            ans=DT(H,W,i,K);
        }
    }
    else{
        vector<int> ans;
        for(int i=1;i<H*W;i++){
            if((i%W)+(i/W)==K){
                ans.push_back(i);
            }
        }
        l=add_or(ans);
        return;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 0 ms 256 KB Output is correct
9 Correct 1 ms 384 KB Output is correct
10 Correct 1 ms 384 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 1 ms 256 KB Output is correct
14 Correct 0 ms 256 KB Output is correct
15 Correct 1 ms 384 KB Output is correct
16 Correct 1 ms 384 KB Output is correct
17 Correct 1 ms 384 KB Output is correct
18 Correct 1 ms 384 KB Output is correct
19 Correct 0 ms 256 KB Output is correct
20 Correct 1 ms 256 KB Output is correct
21 Correct 0 ms 256 KB Output is correct
22 Correct 0 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 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 256 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 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -