Submission #725902

# Submission time Handle Problem Language Result Execution time Memory
725902 2023-04-18T08:36:44 Z Darren0724 Vision Program (IOI19_vision) C++17
0 / 100
10 ms 1728 KB
#include "vision.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
const int B=20;
void construct_network(int n, int m, int K) {
    int N=n+m-1;
	vector<int> num_a(N),num_b(N);
	vector<vector<int>> a(N),b(N);
	int idx=n*m;
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            a[i+j].push_back(i*n+j);
            b[j+n-1-i].push_back(i*n+j);
        }
    }
    for(int i=0;i<N;i++){
        num_a[i]=idx++;
        add_or(a[i]);
    }
    for(int i=0;i<N;i++){
        num_b[i]=idx++;
        add_or(b[i]);
    }
    vector<int> pre_a(N),pre_b(N);
    vector<int> suf_a(N),suf_b(N);
    vector<int> tmp;
    pre_a[0]=idx++;
    tmp.push_back(num_a[0]);
    add_or(tmp);
    tmp.clear();
    for(int i=1;i<N;i++){
        tmp.push_back(num_a[i]);
        tmp.push_back(pre_a[i-1]);
        add_or(tmp);
        tmp.clear();
        pre_a[i]=idx++;
    }
    pre_b[0]=idx++;
    tmp.push_back(num_b[0]);
    add_or(tmp);
    tmp.clear();
    for(int i=1;i<N;i++){
        tmp.push_back(num_b[i]);
        tmp.push_back(pre_b[i-1]);
        add_or(tmp);
        tmp.clear();
        pre_b[i]=idx++;
    }
    suf_a[N-1]=idx++;
    tmp.push_back(num_a[N-1]);
    add_or(tmp);
    tmp.clear();
    for(int i=N-2;i>=0;i--){
        tmp.push_back(num_a[i]);
        tmp.push_back(suf_a[i+1]);
        add_or(tmp);
        tmp.clear();
        suf_a[i]=idx++;
    }
    suf_b[N-1]=idx++;
    tmp.push_back(num_b[N-1]);
    add_or(tmp);
    tmp.clear();
    for(int i=N-2;i>=0;i--){
        tmp.push_back(num_b[i]);
        tmp.push_back(suf_b[i+1]);
        add_or(tmp);
        tmp.clear();
        suf_b[i]=idx++;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1728 KB on inputs (126, 120), (176, 169), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -