제출 #599648

#제출 시각아이디문제언어결과실행 시간메모리
599648MohamedFaresNebili통행료 (IOI18_highway)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "highway.h"
/// #pragma GCC optimize ("Ofast")
/// #pragma GCC target ("avx2")
/// #pragma GCC optimize("unroll-loops")
 
                using namespace std;
 
                using ll = long long;
                using ld = long double;
                using ii = pair<ll, ll>;
                using vi = vector<int>;
 
                #define ff first
                #define ss second
                #define pb push_back
                #define all(x) (x).begin(), (x).end()
                #define lb lower_bound
 
                const int MOD = 1e9 + 7;
 
                void find_pair(int N, vector<int> U, vector<int> V, int A, int B) {
                    int M = U.size(); vector<int> W(M, 0);
                    ll K = ask(W); int S = 0, T = N - 1; 
                    while(S < N) {
                        /// W[S] = 1; ll E = ask(W); W[S] = 0;
                        if(E == K) S++;
                        else break;
                    }
                 /**
                    while(T > S) {
                        W[T - 1] = 1; ll E = ask(W); 
                        if(E == K) T--;
                        else break;
                    }**/
                    answer(S, T);
                }

컴파일 시 표준 에러 (stderr) 메시지

highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:27:28: error: 'E' was not declared in this scope
   27 |                         if(E == K) S++;
      |                            ^