답안 #686974

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
686974 2023-01-26T04:42:46 Z Alihan_8 CONSUL (info1cup19_consul) C++17
컴파일 오류
0 ms 0 KB
#include "grader.h"
#indluce <bits/stcd++.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:2:2: error: invalid preprocessing directive #indluce; did you mean #include?
    2 | #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:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    1 | #include "grader.h"
  +++ |+#include <vector>
    2 | #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 ){
      |              ^~~