记录详情

Compile Error

/in/foo.cc: In function 'bool allSleep(const std::vector<int>&, const std::vector<bool>&)':
/in/foo.cc:9:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < b.size(); ++i) {
                     ~~^~~~~~~~~~
/in/foo.cc:11:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < sleepStatus.size(); ++j) {
                         ~~^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:12:103: error: expected primary-expression before ')' token
             if (sleepStatus[j] && /* 这里需要添加判断节点j是否关注了节点i的逻辑 */) {
                                                                                                       ^
/in/foo.cc: In function 'void dfs(int, const std::vector<std::vector<int> >&, std::vector<bool>&, std::vector<bool>&)':
/in/foo.cc:35:65: error: expected primary-expression before ',' token
             if (allSleep(/* 这里需要传入b和sleepStatus */, node)) {
                                                                 ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:74:21: error: 'i' was not declared in this scope
             cout << i << " "; // 输出没有睡觉的节点编号,注意i需要在这里或之前的一个循环中维护
                     ^

信息

递交者
类型
自测
语言
C++
递交时间
2024-05-16 08:42:07
评测时间
2024-05-16 08:42:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes