Submission #646787

# Submission time Handle Problem Language Result Execution time Memory
646787 2022-09-30T15:54:00 Z ALI Vision Program (IOI19_vision) C++14
12 / 100
6 ms 1232 KB
#include "vision.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;

void construct_network(int H, int W, int K){
    vector<int> query(H*W);
    int counter=H*W;
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            vector<int> a;
            for(int p=i;p<H&&p<=i+K;p++){
                int p2=K+i-p+j;
                if(p2>=W) continue;
                a.pb(p*W+p2);
            }
            if(a.size()>0){
                add_or(a);
                query[i*W+j]=counter;
                counter++;
                continue;
            }
            query[i*W+j]=-1;
        }
    }
    vector<int> b;
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++) if (query[i*W+j]!=-1){
            vector<int> a;
            a.pb(query[i*W+j]);
            a.pb(i*W+j);
            add_and(a);
            b.push_back(counter);
            counter++;
        }
    }
    if(b.size()==0){
        for(int i=0;i<H;i++){
            for (int j=0;j<W&&b.size()<3;j++){
                b.pb(i*W+j);
            }
        }
        add_and(b);
        return;

    }
    add_or(b);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Correct 1 ms 300 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 300 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 300 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 6 ms 788 KB Output is correct
4 Correct 6 ms 976 KB Output is correct
5 Correct 4 ms 724 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Incorrect 2 ms 1048 KB WA in grader: Too many instructions
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1232 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -