/ Vijos /

记录详情

Compile Error

foo.cc:153:12: error: ISO C++ forbids in-class initialization of non-const static member 'Solution::fast_io'
  153 | static int fast_io = [](){
      |            ^~~~~~~
foo.cc:158:2: error: call to non-'constexpr' function 'Solution::<lambda()>'
  153 | static int fast_io = [](){
      |                      ~~~~~
  154 |     std::ios::sync_with_stdio(false);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  155 |     cin.tie(nullptr);
      |     ~~~~~~~~~~~~~~~~~
  156 |     cout.tie(nullptr);
      |     ~~~~~~~~~~~~~~~~~~
  157 |     return 0;
      |     ~~~~~~~~~
  158 | }();
      | ~^~
foo.cc:153:22: note: 'Solution::<lambda()>' is not usable as a 'constexpr' function because:
  153 | static int fast_io = [](){
      |                      ^
foo.cc:153:22: note: lambdas are implicitly 'constexpr' only in C++17 and later
foo.cc:165:2: error: expected '}' at end of input
  165 | }
      |  ^
foo.cc:4:16: note: to match this '{'
    4 | class Solution {
      |                ^
foo.cc:165:2: error: expected unqualified-id at end of input
  165 | }
      |  ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1011 清帝之惑之顺治
语言
C++
递交时间
2023-11-04 16:35:28
评测时间
2023-11-04 16:35:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes