QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#639565#4925. Adjacent PairsMaMengQiCompile Error//C++142.6kb2024-10-13 20:28:212024-10-13 20:28:21

Details

answer.code:43:1: error: ‘vector’ does not name a type
   43 | vector<int> vec[N];
      | ^~~~~~
answer.code: In function ‘void init()’:
answer.code:46:97: error: ‘vec’ was not declared in this scope
   46 |         for(int i=1; i<=n; i++) cnt[0][i] = cnt[1][i] = l[i] = r[i] = len[i] = x[i] = y[i] = 0, vec[i].clear();
      |                                                                                                 ^~~
answer.code: In function ‘int main()’:
answer.code:67:61: error: ‘vec’ was not declared in this scope
   67 |                         if(!cntpr.count(mkp(x[tp], y[tp]))) vec[x[tp]].pb(y[tp]);
      |                                                             ^~~
answer.code:89:57: error: ‘vec’ was not declared in this scope
   89 |                         while(j<=n && (i==p[j] || count(vec[i].begin(), vec[i].end(), p[j]) )) ++j;
      |                                                         ^~~
answer.code:92:37: error: ‘vec’ was not declared in this scope
   92 |                         for(auto j: vec[i]){
      |                                     ^~~