Borderou de evaluare (job #3036984)

Utilizator zagonimathiasZagoni Matyas Elemer zagonimathias Data 25 martie 2023 11:56:06
Problema Reordonarea șirurilor de biți Status done
Runda Universitatea Tehnică din Cluj-Napoca - 2023 - Concurs Compilator cpp-64
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int Starter(const std::vector<int>&, const std::vector<int>&)': main.cpp:11:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 11 | for (int i = 0; i < bits.size(); ++i) | ~~^~~~~~~~~~~~~ main.cpp:22:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 22 | for (int i = 0; i < span.size(); ++i) | ~~^~~~~~~~~~~~~ main.cpp:31:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 31 | if (acc0 = cnt[0]) | ~~~~~^~~~~~~~ main.cpp: In function 'int replaceWithNearest(std::vector<int>&, int)': main.cpp:42:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 42 | while (j < bits.size() && bits[i] == bits[j]) | ~~^~~~~~~~~~~~~ main.cpp: In function 'int constructBits(std::vector<int>&, const std::vector<int>&, bool)': main.cpp:57:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 57 | for (int i = 0; i < targetLen.size(); ++i) | ~~^~~~~~~~~~~~~~~~~~ main.cpp: In function 'int numberOfReplaces(std::vector<int>, const std::vector<int>&)': main.cpp:84:25: error: 'INT_MAX' was not declared in this scope 84 | int replaces0 = INT_MAX, replaces1 = INT_MAX; | ^~~~~~~ main.cpp:6:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 5 | #include <algorithm> +++ |+#include <climits> 6 | main.cpp:92:17: error: 'replaces1' was not declared in this scope; did you mean 'replaces0'? 92 | replaces1 = constructBits(bitsCopy, targetLen, 1); | ^~~~~~~~~ | replaces0 main.cpp:99:17: error: 'replaces1' was not declared in this scope; did you mean 'replaces0'? 99 | replaces1 = constructBits(bits, targetLen, 1); | ^~~~~~~~~ | replaces0 main.cpp:102:36: error: 'replaces1' was not declared in this scope; did you mean 'replaces0'? 102 | return std::min(replaces0, replaces1); | ^~~~~~~~~ | replaces0 Non zero exit status: 1

Ceva nu functioneaza?