답안 #206766

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
206766 2020-03-05T07:16:12 Z joylintp Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

void construct_network(int h, int w, int k)
{
    vector<int> v;
    for (int i = 0; i < h; i++)
        for (int j = 0; j < w; j++)
            for (int a = i; a < h; a++)
                for (int b = 0; b < w; b++)
                    if (abs(a - i) + abs(b - j) == k)
                        v.push_back(add_and({i * w + j, a * w + b}));
    add_or(v);
}

//      *   *  *****  *   *  *   *
//     *   *  *      **  *  *   *
//    *****  *****  * * *  *   *
//   *   *      *  *  **  *   *
//  *   *  *****  *   *   ***

//      ***** ***** *   * *     ***** *   * ***** *****
//        *  *   * *   * *       *   **  *   *   *   *
//       *  *   * ***** *       *   * * *   *   *****
//   *  *  *   *   *   *       *   *  **   *   *
//  ****  *****   *   ***** ***** *   *   *   *

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:12:37: error: 'add_and' was not declared in this scope
                         v.push_back(add_and({i * w + j, a * w + b}));
                                     ^~~~~~~
vision.cpp:13:5: error: 'add_or' was not declared in this scope
     add_or(v);
     ^~~~~~
vision.cpp:13:5: note: suggested alternative: 'rand_r'
     add_or(v);
     ^~~~~~
     rand_r