/ Vijos /

记录详情

Compile Error

/in/foo.cc: In member function 'i64 FactoryDP::peak(const Segment&) const':
/in/foo.cc:39:21: error: 'clamp' is not a member of 'std'
   39 |         return std::clamp((time_ + segment.a) / 2,
      |                     ^~~~~
/in/foo.cc: At global scope:
/in/foo.cc:122:6: error: 'optional' in namespace 'std' does not name a template type
  122 | std::optional<i128> solve(i64 final_time, std::vector<Attack> attacks) {
      |      ^~~~~~~~
/in/foo.cc:122:1: note: 'std::optional' is only available from C++17 onwards
  122 | std::optional<i128> solve(i64 final_time, std::vector<Attack> attacks) {
      | ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:171:16: error: 'optional' in namespace 'std' does not name a template type
  171 |     const std::optional<i128> answer = solve(final_time, std::move(attacks));
      |                ^~~~~~~~
/in/foo.cc:171:11: note: 'std::optional' is only available from C++17 onwards
  171 |     const std::optional<i128> answer = solve(final_time, std::move(attacks));
      |           ^~~
/in/foo.cc:172:10: error: 'answer' was not declared in this scope
  172 |     if (!answer.has_value()) {
      |          ^~~~~~

信息

递交者
类型
递交
题目
P1679 陶陶玩红警
语言
C++
递交时间
2026-09-20 19:40:16
评测时间
2026-09-20 19:40:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes