Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:93:35: error: implicit conversion changes signedness: 'int' to 'const std::vector<unsigned long, std::allocator<unsigned long> >::value_type' (aka 'const unsigned long') [-Werror,-Wsign-conversion]
    vector<size_t> matchWorker(n, -1), matchTask(n, -1);
                   ~~~~~~~~~~~    ^~
/in/sokoban.hpp:93:53: error: implicit conversion changes signedness: 'int' to 'const std::vector<unsigned long, std::allocator<unsigned long> >::value_type' (aka 'const unsigned long') [-Werror,-Wsign-conversion]
    vector<size_t> matchWorker(n, -1), matchTask(n, -1);
                                       ~~~~~~~~~    ^~
/in/sokoban.hpp:109:31: error: implicit conversion changes signedness: 'int' to '__gnu_cxx::__alloc_traits<std::allocator<unsigned long> >::value_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                slack[task] = delta;
                            ~ ^~~~~
/in/sokoban.hpp:109:31: error: implicit conversion changes signedness: 'int' to '__gnu_cxx::__alloc_traits<std::allocator<unsigned long> >::value_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                slack[task] = delta;
                            ~ ^~~~~
/in/sokoban.hpp:119:20: note: in instantiation of function template specialization 'hungarianAlgorithm(const vector<vector<size_t> > &)::(anonymous class)::operator()<(lambda at /in/sokoban.hpp:96:16) &>' requested here
        while (!dfs(worker, visitedWorker, visitedTask, dfs)) {
                   ^
/in/sokoban.hpp:103:37: error: comparison of integers of different signs: '__gnu_cxx::__alloc_traits<std::allocator<unsigned long> >::value_type' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
                if (matchTask[task] == -1 || dfs(matchTask[task], visitedWorker, visitedTask, dfs)) {
                    ~~~~~~~~~~~~~~~ ^  ~~
/in/sokoban.hpp:108:36: error: comparison of integers of different signs: '__gnu_cxx::__alloc_traits<std::allocator<unsigned long> >::value_type' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
            } else if (slack[task] > delta) {
                       ~~~~~~~~~~~ ^ ~~~~~
/in/sokoban.hpp:127:57: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                if (visitedWorker[i]) labelWorker[i] += delta;
                                                     ~~ ^~~~~
/in/sokoban.hpp:128:53: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                if (visitedTask[i]) labelTask[i] -= delta;
                                                 ~~ ^~~~~
/in/sokoban.hpp:129:34: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                else slack[i] -= delta;
                              ~~ ^~~~~
/in/sokoban.hpp:149:26: error: implicit conversion changes signedness: 'int' to '__gnu_cxx::__alloc_traits<std::allocator<unsigned long> >::value_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            cost[i][j] = manhattanDist(boxes[i], targets[j]);
                       ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1

Information

Submit By
Type
Submission
Homework
Project3
Language
C++
Submit At
2024-11-27 20:34:36
Judged At
2024-11-27 20:34:36
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes