Submission #952761

# Submission time Handle Problem Language Result Execution time Memory
952761 2024-03-24T17:52:15 Z kilikuma Handcrafted Gift (IOI20_gift) C++17
Compilation error
0 ms 0 KB
#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;
}

Compilation message

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);
      |           ^