Submission #466739

#TimeUsernameProblemLanguageResultExecution timeMemory
466739habibaissaHandcrafted Gift (IOI20_gift)C++17
Compilation error
0 ms0 KiB
#include "gift.h" int construct(int n, int r, std::vector<int> a, std::vector<int> b, std::vector<int> x){ string s=""; for(int i=0;i<n;i++) { s+='B'; } craft(s); return 1; }

Compilation message (stderr)

gift.cpp: In function 'int construct(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
gift.cpp:3:5: error: 'string' was not declared in this scope
    3 |     string s="";
      |     ^~~~~~
gift.cpp:3: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:6:9: error: 's' was not declared in this scope
    6 |         s+='B';
      |         ^
gift.cpp:8:11: error: 's' was not declared in this scope
    8 |     craft(s);
      |           ^