Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:13:10: error: incomplete type 'std::ios' {aka 'std::basic_ios<char>'} used in nested name specifier
   13 |     ios::sync_with_stdio(false);
      |          ^~~~~~~~~~~~~~~
/in/foo.cc:14:5: error: 'cin' was not declared in this scope
   14 |     cin.tie(nullptr);
      |     ^~~
/in/foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include <iomanip>
  +++ |+#include <iostream>
    2 | using namespace std;
/in/foo.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout << max_sum << endl;
      |     ^~~~
/in/foo.cc:24:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
/in/foo.cc:24:24: error: 'endl' was not declared in this scope
   24 |     cout << max_sum << endl;
      |                        ^~~~
/in/foo.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
    1 | #include <iomanip>
  +++ |+#include <ostream>
    2 | using namespace std;
/in/foo.cc: At global scope:
/in/foo.cc:27:1: error: expected unqualified-id before numeric constant
   27 | 8
      | ^

信息

递交者
类型
递交
题目
P2850 数位和2024.12GESP2级T2
语言
C++
递交时间
2025-04-19 21:03:57
评测时间
2025-04-19 21:03:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes