/ Vijos /

记录详情

Compile Error

foo.cc:7:17: error: ‘bitset’ in namespace ‘std’ does not name a template type
    7 | using BS = std::bitset<BITS>;
      |                 ^~~~~~
foo.cc:3:1: note: ‘std::bitset’ is defined in header ‘<bitset>’; this is probably fixable by adding ‘#include <bitset>’
    2 | #include <cmath>
  +++ |+#include <bitset>
    3 | constexpr int NMAX = 30;
foo.cc: In function ‘int main()’:
foo.cc:13:10: error: ‘vector’ is not a member of ‘std’
   13 |     std::vector<BS> prev(1);
      |          ^~~~~~
foo.cc:3:1: note: ‘std::vector’ is defined in header ‘<vector>’; this is probably fixable by adding ‘#include <vector>’
    2 | #include <cmath>
  +++ |+#include <vector>
    3 | constexpr int NMAX = 30;
foo.cc:13:17: error: ‘BS’ was not declared in this scope; did you mean ‘S’?
   13 |     std::vector<BS> prev(1);
      |                 ^~
      |                 S
foo.cc:13:21: error: ‘prev’ was not declared in this scope; did you mean ‘std::prev’?
   13 |     std::vector<BS> prev(1);
      |                     ^~~~
      |                     std::prev
In file included from /nix/gcc/include/c++/15.3.0/string:49,
                 from /nix/gcc/include/c++/15.3.0/bits/locale_classes.h:42,
                 from /nix/gcc/include/c++/15.3.0/bits/ios_base.h:43,
                 from /nix/gcc/include/c++/15.3.0/ios:46,
                 from /nix/gcc/include/c++/15.3.0/bits/ostream.h:43,
                 from /nix/gcc/include/c++/15.3.0/ostream:42,
                 from /nix/gcc/include/c++/15.3.0/iostream:43,
                 from foo.cc:1:
/nix/gcc/include/c++/15.3.0/bits/stl_iterator_base_funcs.h:246:5: note: ‘std::prev’ declared here
  246 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
foo.cc:22:14: error: ‘vector’ is not a member of ‘std’
   22 |         std::vector<BS> cur(len);
      |              ^~~~~~
foo.cc:22:14: note: ‘std::vector’ is defined in header ‘<vector>’; this is probably fixable by adding ‘#include <vector>’
foo.cc:22:25: error: ‘cur’ was not declared in this scope
   22 |         std::vector<BS> cur(len);
      |                         ^~~
foo.cc:28:15: error: expected ‘;’ before ‘reachable’
   28 |             BS reachable;
      |               ^~~~~~~~~~
      |               ;
foo.cc:33:21: error: ‘reachable’ was not declared in this scope
   33 |                     reachable |= prev[j - 1];
      |                     ^~~~~~~~~
foo.cc:35:21: error: ‘reachable’ was not declared in this scope
   35 |                     reachable |= prev[j];
      |                     ^~~~~~~~~
foo.cc:39:17: error: ‘reachable’ was not declared in this scope
   39 |                 reachable = prev[j] | prev[j + 1];
      |                 ^~~~~~~~~
foo.cc:43:23: error: ‘reachable’ was not declared in this scope
   43 |             cur[j] = (reachable << x) | (reachable >> x);
      |                       ^~~~~~~~~

信息

递交者
类型
递交
题目
P1280 The Moment-遇见
语言
C++
递交时间
2026-10-14 20:01:46
评测时间
2026-10-14 20:01:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes