QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#271514#7879. Colorful Balloonsucup-team2334#Compile Error//C++14644b2023-12-02 13:09:062023-12-02 13:09:06

Details

answer.code:5:17: error: ‘std::map<std::__cxx11::basic_string<char>, int> time’ redeclared as different kind of entity
    5 | map<string,int> time;
      |                 ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h:148,
                 from /usr/include/c++/11/ext/atomicity.h:35,
                 from /usr/include/c++/11/bits/ios_base.h:39,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:1:
/usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’
   75 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
answer.code: In function ‘int main()’:
answer.code:15:43: error: request for member ‘find’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw ()’ {aka ‘long int(long int*)’}
   15 |         map<string,int>::iterator it=time.find(c);
      |                                           ^~~~
answer.code:16:21: error: request for member ‘end’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw ()’ {aka ‘long int(long int*)’}
   16 |         if(it==time.end()){
      |                     ^~~
answer.code:17:18: error: request for member ‘insert’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw ()’ {aka ‘long int(long int*)’}
   17 |             time.insert(pair<string,int>(c,t));
      |                  ^~~~~~
answer.code:23:44: error: request for member ‘begin’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw ()’ {aka ‘long int(long int*)’}
   23 |     for (map<string,int>::iterator it=time.begin();it!=time.end();++it){
      |                                            ^~~~~
answer.code:23:61: error: request for member ‘end’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw ()’ {aka ‘long int(long int*)’}
   23 |     for (map<string,int>::iterator it=time.begin();it!=time.end();++it){
      |                                                             ^~~