Borderou de evaluare (job #2842514)

Utilizator mediocrekarmaChirvasa George Matei mediocrekarma Data 1 februarie 2022 00:40:56
Problema Blis Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:7: warning: ignoring '#pragma warning ' [-Wunknown-pragmas] 7 | #pragma warning(disable : 4996) | main.cpp:5:1: error: 'ifstream' does not name a type 5 | ifstream fin("blis.in"); | ^~~~~~~~ main.cpp:6:1: error: 'ofstream' does not name a type 6 | ofstream fout("blis.out"); | ^~~~~~~~ main.cpp: In function 'int part1(const string&, const int&)': main.cpp:11:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'const int' [-Wsign-compare] 11 | if (bits.size() <= k) { | ~~~~~~~~~~~~^~~~ main.cpp:19:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 19 | for (int i = k; i < bits.size(); ++i) { | ~~^~~~~~~~~~~~~ main.cpp: In function 'int part2(const string&, const int&)': main.cpp:33:13: error: 'INT_MIN' was not declared in this scope 33 | dp[0] = INT_MIN; | ^~~~~~~ main.cpp:5:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'? 4 | #include <vector> +++ |+#include <climits> 5 | ifstream fin("blis.in"); main.cpp:34:34: error: 'INT_MAX' was not declared in this scope 34 | fill(dp + 1, dp + N_MAX + 1, INT_MAX); | ^~~~~~~ main.cpp:34:34: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? main.cpp:35:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 35 | for (int i = 0; i < bits.size(); ++i) { | ~~^~~~~~~~~~~~~ main.cpp:56:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 56 | for (int i = 0; i < bits.size(); ++i) { | ~~^~~~~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:66:5: error: 'fin' was not declared in this scope 66 | fin >> k >> bits; | ^~~ main.cpp:67:5: error: 'fout' was not declared in this scope 67 | fout << part1(bits, k) << '\n' << part2(bits, k); | ^~~~ main.cpp: In function 'int part2(const string&, const int&)': main.cpp:61:1: warning: control reaches end of non-void function [-Wreturn-type] 61 | } | ^ Non zero exit status: 1

Ceva nu functioneaza?