답안 #686982

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
686982 2023-01-26T04:44:38 Z Alihan_8 CONSUL (info1cup19_consul) C++17
컴파일 오류
0 ms 0 KB
#indluce <bits/stcd++.h>
//#include "grader.h"
using namespace std;
#define pb push_back
void solve(int n){
    int Mx = (n+2)/3;
    vector <int> res;
    for ( int i = 1; i <= n; i++ ){
        if ( ask(i) > Mx ){
            say_answer(i);
            return;
        }
    }
    say_answer(-1);
}

Compilation message

consul.cpp:1:2: error: invalid preprocessing directive #indluce; did you mean #include?
    1 | #indluce <bits/stcd++.h>
      |  ^~~~~~~
      |  include
consul.cpp: In function 'void solve(int)':
consul.cpp:7:5: error: 'vector' was not declared in this scope
    7 |     vector <int> res;
      |     ^~~~~~
consul.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 | #indluce <bits/stcd++.h>
consul.cpp:7:13: error: expected primary-expression before 'int'
    7 |     vector <int> res;
      |             ^~~
consul.cpp:9:14: error: 'ask' was not declared in this scope
    9 |         if ( ask(i) > Mx ){
      |              ^~~
consul.cpp:10:13: error: 'say_answer' was not declared in this scope
   10 |             say_answer(i);
      |             ^~~~~~~~~~
consul.cpp:14:5: error: 'say_answer' was not declared in this scope
   14 |     say_answer(-1);
      |     ^~~~~~~~~~