답안 #1050504

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1050504 2024-08-09T10:17:21 Z vjudge1 Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#pragma GCC optimize("unroll-loops,Ofast,O3")
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define spc << " " <<
#define endl "\n"
#define all(x) x.begin(), x.end()
#define int long long
#define ii pair<long long,int>
#define vi vector<int>
#define vii vector<ii>
#define st first
#define nd second
#define inf 1e15
#define MOD 1000000007
#define MX 50005
using namespace std;


void construct_network(int H, int W, int K){
    vi results;
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            if(i+j+K > h+w-2) continue;
            vi ors;
            for(int k=0; k<=K; k++){
                if(i+k<H && j+K-k<W) ors.pb((i+k)*W+(j+K-k));
            }
            int res = add_or(ors);
            results.pb(add_and({add_and({i*W+j}), res}));
        }
    }
    add_or(results);
}

Compilation message

vision.cpp: In function 'void construct_network(long long int, long long int, long long int)':
vision.cpp:24:24: error: 'h' was not declared in this scope
   24 |             if(i+j+K > h+w-2) continue;
      |                        ^
vision.cpp:24:26: error: 'w' was not declared in this scope
   24 |             if(i+j+K > h+w-2) continue;
      |                          ^
vision.cpp:29:23: error: 'add_or' was not declared in this scope
   29 |             int res = add_or(ors);
      |                       ^~~~~~
vision.cpp:30:33: error: 'add_and' was not declared in this scope
   30 |             results.pb(add_and({add_and({i*W+j}), res}));
      |                                 ^~~~~~~
vision.cpp:30:24: error: 'add_and' was not declared in this scope
   30 |             results.pb(add_and({add_and({i*W+j}), res}));
      |                        ^~~~~~~
vision.cpp:33:5: error: 'add_or' was not declared in this scope
   33 |     add_or(results);
      |     ^~~~~~