QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#639276#4929. Longest Unfriendly SubsequenceZhaoZiLongCompile Error//C++142.4kb2024-10-13 18:40:412024-10-13 18:40:41

Details

answer.code:38:1: error: ‘vector’ does not name a type
   38 | vector<int> vec;
      | ^~~~~~
answer.code:40:1: error: ‘vector’ does not name a type
   40 | vector<int> lst; bool vis[N];
      | ^~~~~~
answer.code: In function ‘void addlst(ll)’:
answer.code:43:33: error: ‘lst’ was not declared in this scope
   43 |         if(!vis[x]) vis[x] = 1, lst.pb(x);
      |                                 ^~~
answer.code:45:29: error: ‘lst’ was not declared in this scope
   45 |                 for(auto it=lst.begin(); it!=lst.end(); it++) if(*it == x) {lst.erase(it); break;}
      |                             ^~~
answer.code:46:17: error: ‘lst’ was not declared in this scope
   46 |                 lst.pb(x);
      |                 ^~~
answer.code:48:12: error: ‘lst’ was not declared in this scope
   48 |         if(lst.size() > MXLEN) lst.erase(lst.begin());
      |            ^~~
answer.code: In function ‘int main()’:
answer.code:54:17: error: ‘vec’ was not declared in this scope
   54 |                 vec.clear();
      |                 ^~~
answer.code:55:17: error: ‘lst’ was not declared in this scope
   55 |                 lst.clear();
      |                 ^~~