QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#489020#9156. 百万富翁vgtbCompile Error//C++141.1kb2024-07-24 17:02:082024-07-24 17:02:11

Details

answer.code: In function ‘int richest(int, int, int)’:
answer.code:40:50: error: ‘map’ is not a member of ‘std’
   40 |                         int sz=v[i].size(); std::map<int,int> mp;
      |                                                  ^~~
answer.code:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
    1 | #include "richest.h"
  +++ |+#include <map>
    2 | 
answer.code:40:54: error: expected primary-expression before ‘int’
   40 |                         int sz=v[i].size(); std::map<int,int> mp;
      |                                                      ^~~
answer.code:41:57: error: ‘mp’ was not declared in this scope; did you mean ‘m’?
   41 |                         rep(x,0,sz-1) rep(y,x+1,sz-1) ++mp[res[cnt++]];
      |                                                         ^~
      |                                                         m
answer.code:42:42: error: ‘mp’ was not declared in this scope; did you mean ‘m’?
   42 |                         rep(x,0,sz-1) if(mp[v[i][x]]==sz-1) cpy.emplace_back(v[i][x]);
      |                                          ^~
      |                                          m