답안 #291703

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
291703 2020-09-05T16:53:48 Z medmdg Vision Program (IOI19_vision) C++14
12 / 100
1 ms 384 KB
#include<bits/stdc++.h>
#include "vision.h"
using namespace std;
 
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(K==1){
        
        for(int i=0;i<H*W-1;i+=2){
            vector<int> ans;
            ans.push_back(i);
            l=add_or(ans);
            ans.pop_back();
            if(i<W-1)
                ans.push_back(i+1);
            if(i<H-1)
                ans.push_back(i+W);
            l=add_or(ans);
            while(ans.size())
                ans.pop_back();
            ans.push_back(l);
            ans.push_back(l-1);
            l=add_and(ans);
            ans[0]++;
            ans[1]--;
            l=add_or(ans);
        }
        return;
    }
    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;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 0 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 256 KB Output is correct
13 Correct 0 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 256 KB Output is correct
19 Correct 0 ms 256 KB Output is correct
20 Correct 0 ms 256 KB Output is correct
21 Correct 0 ms 256 KB Output is correct
22 Correct 1 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -