QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#725599#7951. Magic CardsmarvinthangCompile Error//C++144.1kb2024-11-08 19:00:482024-11-08 19:00:48

Details

answer.code: In function ‘std::ostream& std::print_tuple_utils(ostream&, const T&)’:
answer.code:29:90: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
   29 | template <size_t i, class T> ostream &print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ")"; else return print_tuple_utils<i + 1, T>(out << (i ? ", " : "(") << get<i>(tup), tup); }
      |                                                                                          ^~~~~~~~~
answer.code: In member function ‘bool Comparer::operator()(const std::bitset<100>&, const std::bitset<100>&) const’:
answer.code:48:79: error: missing template arguments before ‘{’ token
   48 |         bool operator() (const Bitset &a, const Bitset &b) const { return pair{(a & mask).to_ullong(), ((a >> 64) & mask).to_ullong()} < pair{(b & mask).to_ullong(), ((b >> 64) & mask).to_ullong()}; }
      |                                                                               ^
answer.code:48:79: error: expected ‘;’ before ‘{’ token
answer.code:48:134: error: expected ‘;’ before ‘}’ token
   48 |         bool operator() (const Bitset &a, const Bitset &b) const { return pair{(a & mask).to_ullong(), ((a >> 64) & mask).to_ullong()} < pair{(b & mask).to_ullong(), ((b >> 64) & mask).to_ullong()}; }
      |                                                                                                                                      ^
answer.code:48:136: error: expected primary-expression before ‘<’ token
   48 |         bool operator() (const Bitset &a, const Bitset &b) const { return pair{(a & mask).to_ullong(), ((a >> 64) & mask).to_ullong()} < pair{(b & mask).to_ullong(), ((b >> 64) & mask).to_ullong()}; }
      |                                                                                                                                        ^
answer.code:48:142: error: missing template arguments before ‘{’ token
   48 |         bool operator() (const Bitset &a, const Bitset &b) const { return pair{(a & mask).to_ullong(), ((a >> 64) & mask).to_ullong()} < pair{(b & mask).to_ullong(), ((b >> 64) & mask).to_ullong()}; }
      |                                                                                                                                              ^
answer.code: In function ‘int main()’:
answer.code:16:62: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 | #define     file(name)  if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
      |                                                       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
answer.code:79:9: note: in expansion of macro ‘file’
   79 |         file("test");
      |         ^~~~
answer.code:16:95: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 | #define     file(name)  if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
      |                                                                                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:79:9: note: in expansion of macro ‘file’
   79 |         file("test");
      |         ^~~~