QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#334690#6222. 精准预测hyforces#Compile Error//C++202.9kb2024-02-22 11:41:372024-04-28 08:41:53

Details

answer.code:14:16: error: ‘A’ was not declared in this scope
   14 | bitset<N>alloc[A];
      |                ^
answer.code: In function ‘void deallocate(int)’:
answer.code:23:5: error: ‘alloc’ was not declared in this scope; did you mean ‘valloc’?
   23 |     alloc[u].reset();
      |     ^~~~~
      |     valloc
answer.code:24:5: error: reference to ‘allocator’ is ambiguous
   24 |     allocator.push(u);
      |     ^~~~~~~~~
In file included from /usr/include/c++/13/bits/stringfwd.h:40,
                 from /usr/include/c++/13/string:41,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:1:
/usr/include/c++/13/bits/memoryfwd.h:65:11: note: candidates are: ‘template<class> class std::allocator’
   65 |     class allocator;
      |           ^~~~~~~~~
answer.code:15:11: note:                 ‘std::stack<int> allocator’
   15 | stack<int>allocator;
      |           ^~~~~~~~~
answer.code: In function ‘int allocate()’:
answer.code:28:11: error: reference to ‘allocator’ is ambiguous
   28 |     int u=allocator.top();
      |           ^~~~~~~~~
/usr/include/c++/13/bits/memoryfwd.h:65:11: note: candidates are: ‘template<class> class std::allocator’
   65 |     class allocator;
      |           ^~~~~~~~~
answer.code:15:11: note:                 ‘std::stack<int> allocator’
   15 | stack<int>allocator;
      |           ^~~~~~~~~
answer.code:29:5: error: reference to ‘allocator’ is ambiguous
   29 |     allocator.pop();
      |     ^~~~~~~~~
/usr/include/c++/13/bits/memoryfwd.h:65:11: note: candidates are: ‘template<class> class std::allocator’
   65 |     class allocator;
      |           ^~~~~~~~~
answer.code:15:11: note:                 ‘std::stack<int> allocator’
   15 | stack<int>allocator;
      |           ^~~~~~~~~
answer.code: In function ‘void solve()’:
answer.code:85:19: error: ‘A’ was not declared in this scope
   85 |     for(int a=1;a<A;++a)allocator.push(a);
      |                   ^
answer.code:85:25: error: reference to ‘allocator’ is ambiguous
   85 |     for(int a=1;a<A;++a)allocator.push(a);
      |                         ^~~~~~~~~
/usr/include/c++/13/bits/memoryfwd.h:65:11: note: candidates are: ‘template<class> class std::allocator’
   65 |     class allocator;
      |           ^~~~~~~~~
answer.code:15:11: note:                 ‘std::stack<int> allocator’
   15 | stack<int>allocator;
      |           ^~~~~~~~~
answer.code:95:13: error: ‘f’ was not declared in this scope
   95 |         if(!f[u])f[u]=allocate();
      |             ^
answer.code:98:17: error: expected primary-expression before ‘)’ token
   98 |             if(!)
      |                 ^
answer.code:99:9: error: expected primary-expression before ‘}’ token
   99 |         }
      |         ^
answer.code:104:27: error: ‘alloc’ was not declared in this scope; did you mean ‘valloc’?
  104 |             cout<<((n-1)-(alloc[ans[a]]|useless).count())<<" ";
      |                           ^~~~~
      |                           valloc