제출 #952761

#제출 시각아이디문제언어결과실행 시간메모리
952761kilikumaHandcrafted Gift (IOI20_gift)C++17
컴파일 에러
0 ms0 KiB
#include "gift.h" #include <bits/stdc++.h> int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) { string s(n, 'R'); craft(s); return 1; }

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

gift.cpp:5:29: error: 'vector' has not been declared
    5 | int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) {
      |                             ^~~~~~
gift.cpp:5:35: error: expected ',' or '...' before '<' token
    5 | int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) {
      |                                   ^
gift.cpp: In function 'int construct(int, int, int)':
gift.cpp:6:5: error: 'string' was not declared in this scope
    6 |     string s(n, 'R');
      |     ^~~~~~
gift.cpp:6:5: note: suggested alternatives:
In file included from /usr/include/c++/10/string:39,
                 from gift.h:2,
                 from gift.cpp:1:
/usr/include/c++/10/bits/stringfwd.h:79:33: note:   'std::string'
   79 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from gift.h:2,
                 from gift.cpp:1:
/usr/include/c++/10/string:67:11: note:   'std::pmr::string'
   67 |     using string    = basic_string<char>;
      |           ^~~~~~
gift.cpp:7:11: error: 's' was not declared in this scope
    7 |     craft(s);
      |           ^