답안 #587946

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
587946 2022-07-02T14:41:15 Z ogibogi2004 Vision Program (IOI19_vision) C++14
0 / 100
32 ms 2680 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K) {

    if(K==1)
    {
        int c1[W],r1[H],c2[W],r2[H];
        for(int i=0;i<H;i++)
        {
            vector<int>v;
            for(int j=0;j<W;j++)v.push_back(i*W+j);
            r1[i]=add_or(v);
        }
        for(int i=0;i<H-1;i++)
        {
            vector<int>v1;
            vector<int>v2;
            for(int j=0;j<W;j++)v1.push_back(i*W+j);
            for(int j=0;j<W;j++)v2.push_back((i+1)*W+j);
            r2[i]=add_and({add_or(v1),add_or(v2)});
        }
        for(int j=0;j<W;j++)
        {
            vector<int>v;
            for(int i=0;i<H;i++)v.push_back(W*i+j);
            c1[j]=add_or(v);
        }
        for(int j=0;j<W-1;j++)
        {
            vector<int>v1,v2;
            for(int i=0;i<H;i++)v1.push_back(W*i+j);
            for(int i=0;i<H;i++)v2.push_back(W*i+j+1);
            c2[j]=add_and({add_or(v1),add_or(v2)});
        }

        int cc1,cc2,rr1,rr2;
        vector<int>v;


        v.clear();
        for(int i=0;i<W;i++)v.push_back(c1[i]);
        cc1=add_xor(v);

        v.clear();
        for(int i=0;i<H;i++)v.push_back(r1[i]);
        rr1=add_xor(v);

        v.clear();
        for(int i=0;i<W-1;i++)v.push_back(c2[i]);
        cc2=add_xor(v);

        v.clear();
        for(int i=0;i<H-1;i++)v.push_back(r2[i]);
        rr2=add_xor(v);


        int case1=add_and({cc1,rr2});
        int case2=add_and({cc2,rr1});
        add_or({case1,case2});
        return;
    }
    vector<int>v;
    for(int i=0;i<H;i++)
    {
        for(int j=0;j<W;j++)
        {
            if(i+j==K)v.push_back(i*W+j);
        }
    }
    add_or(v);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 340 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 3 ms 468 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 6 ms 596 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Incorrect 1 ms 340 KB WA in grader: Instruction with no inputs
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 2680 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 468 KB Output is correct
4 Correct 4 ms 596 KB Output is correct
5 Incorrect 1 ms 340 KB WA in grader: Instruction with no inputs
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
2 Halted 0 ms 0 KB -