QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#248666#6398. Puzzle: TapaZhaoZiLongCompile Error//C++233.9kb2023-11-11 20:48:342023-11-11 20:48:34

Details

answer.code:21:72: error: macro "assert" passed 6 arguments, but takes just 1
   21 |             else assert(set<int>{2, 3, 4, 5, 7, 8}.count(a[i][j] - '0'));
      |                                                                        ^
In file included from /usr/include/c++/11/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/assert.h:92: note: macro "assert" defined here
   92 | #  define assert(expr)                                                  \
      | 
answer.code: In function ‘int main()’:
answer.code:21:18: error: ‘assert’ was not declared in this scope
   21 |             else assert(set<int>{2, 3, 4, 5, 7, 8}.count(a[i][j] - '0'));
      |                  ^~~~~~
answer.code:2:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    1 | #include<bits/stdc++.h>
  +++ |+#include <cassert>
    2 | using namespace std;