Mã chấm: 268267
Main.cc: In function ‘int calculateMaxValue(const string&)’: Main.cc:7:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 1; i < str.length(); i++) { ~~^~~~~~~~~~~~~~ Main.cc:10:26: error: assignment of read-only location ‘(& str)->std::__cxx11::basic_string::operator[](((std::__cxx11::basic_string::size_type)i))’ str[i] = 'b'; ^~~ Main.cc:12:26: error: assignment of read-only location ‘(& str)->std::__cxx11::basic_string::operator[](((std::__cxx11::basic_string::size_type)i))’ str[i] = 'a'; ^~~ Main.cc:14:26: error: assignment of read-only location ‘(& str)->std::__cxx11::basic_string::operator[](((std::__cxx11::basic_string::size_type)i))’ str[i] = 'a'; ^~~