Borderou de evaluare (job #3278096)

Utilizator Teodor-CiprianNica Teodor-Ciprian Teodor-Ciprian Data 18 februarie 2025 17:53:51
Problema Coco Chanel Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:11:10: error: 'n' was not declared in this scope 11 | fin>>n>>m; | ^ main.cpp:11:13: error: 'm' was not declared in this scope 11 | fin>>n>>m; | ^ main.cpp:15:13: error: 'i' was not declared in this scope 15 | fin>>vg[i]; | ^ main.cpp:24:7: error: invalid operands of types 'long long int [100001]' and 'int' to binary 'operator*' 24 | vc*=2; | ~~^~~ main.cpp:24:7: note: in evaluation of 'operator*=(long long int [100001], int)' main.cpp:26:9: error: no match for 'operator<<' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int') 26 | fout<<sg<<'\n'; | ~~~~^~~~ | | | | | int | std::ifstream {aka std::basic_ifstream<char>} main.cpp:26:9: note: candidate: 'operator<<(int, int)' (built-in) 26 | fout<<sg<<'\n'; | ~~~~^~~~ main.cpp:26:9: note: no known conversion for argument 1 from 'std::ifstream' {aka 'std::basic_ifstream<char>'} to 'int' In file included from /usr/include/c++/12.2.1/bits/basic_string.h:47, from /usr/include/c++/12.2.1/string:53, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/ostream:38, from /usr/include/c++/12.2.1/iostream:39, from main.cpp:1: /usr/include/c++/12.2.1/string_view:672:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 672 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/12.2.1/string_view:672:5: note: template argument deduction/substitution failed: main.cpp:26:11: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 26 | fout<<sg<<'\n'; | ^~ /usr/include/c++/12.2.1/bits/basic_string.h:3883:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3883 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/basic_string.h:3883:5: note: template argument deduction/substitution failed: main.cpp:26:11: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 26 | fout<<sg<<'\n'; | ^~ In file included from /usr/include/c++/12.2.1/bits/ios_base.h:46: /usr/include/c++/12.2.1/system_error:279:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 279 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?