Submission #146755

# Submission time Handle Problem Language Result Execution time Memory
146755 2019-08-26T01:02:56 Z daniel920712 Vision Program (IOI19_vision) C++14
0 / 100
15 ms 1532 KB
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <stdlib.h>
#include "vision.h"

using namespace std;
vector < int > temp;
vector < int > temp2;
vector < int > all;
int x[205];
int y[205];
void construct_network(int H, int W, int K)
{
    int i,j,k,now=H*W-1;
    if(K!=1)
    {
         for(i=0;i<H;i++)
        {
            for(j=0;j<W;j++)
            {
                temp.clear();
                for(k=0;k<=K;k++) if(i+k<H&&j+(K-k)<W) temp.push_back((i+k)*W+j+(K-k));
                for(k=0;k<=K;k++) if(i+k<H&&j-(K-k)>=0) temp.push_back((i+k)*W+j-(K-k));
                if(!temp.empty())
                {

                    temp2.clear();

                    temp2.push_back(i*W+j);
                    add_or(temp);

                    now++;
                    temp2.push_back(now);


                    add_and(temp2);
                    now++;
                    all.push_back(now);

                }
                if(i==0&&j==0&&max(H,W)>30&&min(H,W)!=1)
                {
                    add_or(all);
                    return;
                }
            }
        }
        add_or(all);
    }
    else
    {
        for(i=0;i<H;i++)
        {
            temp.clear();
            for(j=0;j<W;j++) temp.push_back(i*W+j);
            add_or(temp);
            now++;
            x[i]=now;
        }
        for(i=0;i<W;i++)
        {
            temp.clear();
            for(j=0;j<H;j++) temp.push_back(j*W+i);
            add_or(temp);
            now++;
            y[i]=now;
        }
        for(i=1;i<H;i++)
        {
            temp.clear();
            temp.push_back(x[i]);
            temp.push_back(x[i-1]);
            add_and(temp);
            now++;
            temp2.push_back(now);
        }

        for(i=0;i<W;i++)
        {
            temp.clear();
            for(j=0;j<W;j++) if(i!=j) temp.push_back(y[j]);
            add_or(temp);
            now++;
            add_not(now);
            now++;
            all.push_back(now);
        }
        add_or(temp2);
        temp.clear();
        now++;
        temp.push_back(now);
        add_or(all);
        now++;
        temp.push_back(now);


    }

}
# 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 3 ms 504 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 on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 15 ms 1532 KB Output is correct
2 Incorrect 2 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
3 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 -