답안 #293713

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
293713 2020-09-08T10:12:44 Z Autoratch Vision Program (IOI19_vision) C++14
26 / 100
12 ms 1152 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

void construct_network(int m, int n, int k) 
{
    vector<int> vx,hx,tmp;
    for(int i = 0;i < m;i++)
    {
        tmp.clear();
        for(int j = 0;j < n;j++) tmp.push_back(i*n+j);
        hx.push_back(add_xor(tmp));
    }
    for(int i = 0;i < n;i++)
    {
        tmp.clear();
        for(int j = 0;j < m;j++) tmp.push_back(j*n+i);
        vx.push_back(add_xor(tmp));
    }
    int ah = add_or(hx),av = add_or(vx);
    vector<int> sv,sh;
    for(int i = 0;i+k < m;i++) sh.push_back(add_and({hx[i],hx[i+k]}));
    for(int i = 0;i+k < n;i++) sv.push_back(add_and({vx[i],vx[i+k]}));
    int oh,ov;
    if(sv.empty()) 
    {
        oh = add_or(sh);
        add_and({oh,add_not(av)});
    }
    else if(sh.empty())
    {
        ov = add_or(sv);
        add_and({ov,add_not(ah)});
    }
    else
    {
        int ov = add_or(sv),oh = add_or(sh);
        int t1 = add_and({ov,add_not(ah)});
        int t2 = add_and({oh,add_not(av)});
        add_or({t1,t2});
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 1 ms 384 KB Output is correct
10 Correct 1 ms 384 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 1 ms 384 KB Output is correct
14 Correct 1 ms 384 KB Output is correct
15 Correct 1 ms 384 KB Output is correct
16 Correct 1 ms 384 KB Output is correct
17 Correct 1 ms 384 KB Output is correct
18 Correct 1 ms 384 KB Output is correct
19 Correct 1 ms 384 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 0 ms 256 KB Output is correct
22 Correct 0 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1152 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 2 ms 512 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 5 ms 768 KB Output is correct
8 Correct 5 ms 768 KB Output is correct
9 Correct 11 ms 1152 KB Output is correct
10 Correct 0 ms 256 KB Output is correct
11 Correct 1 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Incorrect 0 ms 256 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -