답안 #764139

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
764139 2023-06-23T07:40:24 Z alexander707070 Vision Program (IOI19_vision) C++14
0 / 100
2 ms 1872 KB
#include<bits/stdc++.h>
#include "vision.h"
#define MAXN 507
using namespace std;
 
int n,m,k,dist;
vector<int> d[MAXN],e[MAXN];
int res[MAXN],ser[MAXN]; 
vector<int> bad,good;

void construct_network(int H, int W, int K){
    n=H; m=W; k=K;
 
    for(int i=0;i<n;i++){
        for(int f=0;f<m;f++){
            d[i-f+m-1].push_back(i*m+f);
            e[i+f].push_back(i*m+f);
        }
    }
    
    for(int i=0;i<n+m-1;i++){
        res[i]=add_or(d[i]);
        ser[i]=add_or(e[i]);
    }
    
    for(int i=0;i<n+m-1;i++){
        for(int f=i+k+1;f<n+m-1;f++){
            bad.push_back(add_and({res[i],res[f]}));
            bad.push_back(add_and({ser[i],ser[f]}));
        }
    }
    
    for(int i=0;i+k<n+m-1;i++){
        good.push_back(add_and({res[i],res[i+k]}));
        good.push_back(add_and({ser[i],ser[i+k]}));
    }
    
    add_and({add_or(good) , add_not(add_or(bad)) }); 
}
 
/*
int main(){
 
    cout<<count_rectangles({{4, 8, 7, 5, 6},
{7, 4, 10, 3, 5},
{9, 7, 20, 14, 2},
{9, 14, 7, 3, 6},
{5, 7, 5, 2, 7},
{4, 5, 13, 5, 6}})<<"\n";
 
 K=3
 X . . O . .
 . O . . O .
 . . O . . X
 . . . O . .
 
 
 
    return 0;
}
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1104 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 328 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1872 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -