Compile Error

/in/foo.cc: In member function 'bool Score::operator<(const Score&) const':
/in/foo.cc:20:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |         for (int i = 0; i < scores.size(); ++i) {
      |                         ~~^~~~~~~~~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:31:22: error: no matching function for call to 'Score::Score()'
   31 | Score dp[MAX_N][MAX_T];        // dp[k][s]:前k门课花s时间的最优得分组合
      |                      ^
/in/foo.cc:15:5: note: candidate: 'Score::Score(int)'
   15 |     Score(int n) : scores(n, 0), total(0) {}
      |     ^~~~~
/in/foo.cc:15:5: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:11:8: note: candidate: 'Score::Score(const Score&)'
   11 | struct Score {
      |        ^~~~~
/in/foo.cc:11:8: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:11:8: note: candidate: 'Score::Score(Score&&)'
/in/foo.cc:11:8: note:   candidate expects 1 argument, 0 provided

信息

递交者
类型
递交
题目
P1019 分配时间(times)
语言
C++
递交时间
2025-12-14 17:06:24
评测时间
2025-12-14 17:06:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes