QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#257746#1957. Friendship GraphsMaMengQiCompile Error//C++171.3kb2023-11-19 12:28:102023-11-19 12:28:11

詳細信息

answer.code:4:9: warning: ISO C++11 requires whitespace after the macro name
    4 | #define taskname"B"
      |         ^~~~~~~~
answer.code:18:1: error: ‘bitset’ does not name a type
   18 | bitset<1005> cur, res;
      | ^~~~~~
answer.code: In function ‘void solve()’:
answer.code:20:6: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
   20 |      cin >> n >> m;
      |      ^~~
      |      std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:75,
                 from answer.code:1:
/usr/include/c++/11/iostream:60:18: note: ‘std::cin’ declared here
   60 |   extern istream cin;           /// Linked to standard input
      |                  ^~~
answer.code:27:5: error: ‘cur’ was not declared in this scope
   27 |     cur[0] = 1;
      |     ^~~
answer.code:32:13: error: ‘res’ was not declared in this scope
   32 |             res = (cur << num[0]) | (cur << num[1]);
      |             ^~~
answer.code:33:13: error: ‘swap’ was not declared in this scope
   33 |             swap(cur, res);
      |             ^~~~
answer.code:33:13: note: suggested alternatives:
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from answer.code:1:
/usr/include/c++/11/bits/regex.h:2143:5: note:   ‘std::__cxx11::swap’
 2143 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
In file included from /usr/include/c++/11/bits/stl_pair.h:59,
                 from /usr/include/c++/11/bits/stl_algobase.h:64,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/bits/move.h:196:5: note:   ‘std::swap’
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/11/bits/move.h:196:5: note:   ‘std::swap’
In file included from /usr/include/c++/11/exception:147,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/exception_ptr.h:218:5: note:   ‘std::__exception_ptr::swap’
  218 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
In file included from /usr/include/c++/11/filesystem:45,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from answer.code:1:
/usr/include/c++/11/bits/fs_path.h:693:15: note:   ‘std::filesystem::__cxx11::swap’
  693 |   inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
      |               ^~~~
answer.code:39:17: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
   39 |                 cout << -1 << endl;
      |                 ^~~~
      |                 std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:75,
                 from answer.code:1:
/usr/include/c++/11/iostream:61:18: note: ‘std::cout’ declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
answer.code:39:31: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
   39 |                 cout << -1 << endl;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/11/istream:39,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/ostream:681:5: note: ‘std::endl’ declared here
  681 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
answer.code:47:19: error: ‘min’ was not declared in this scope; did you mean ‘std::min’?
   47 |             ans = min(ans, abs(n - i - i));
      |                   ^~~
      |                   std::min
In file included from /usr/include/c++/11/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
 3455 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
answer.code:49:5: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
   49 |     cout << ans << endl;
      |     ^~~~
      |     std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:75,
                 from answer.code:1:
/usr/include/c++/11/iostream:61:18: note: ‘std::cout’ declared here
   61 |   exte...