Borderou de evaluare (job #3179212)

Utilizator OliviaDavidescuOlivia Davidescu OliviaDavidescu Data 3 decembrie 2023 12:39:06
Problema Retea2 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:19:5: error: 'ifstream' was not declared in this scope; did you mean 'std::ifstream'? 19 | ifstream fin("retea2.in"); | ^~~~~~~~ | std::ifstream In file included from /usr/include/c++/12.2.1/ios:38, 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/iosfwd:162:41: note: 'std::ifstream' declared here 162 | typedef basic_ifstream<char> ifstream; | ^~~~~~~~ main.cpp:20:5: error: 'fin' was not declared in this scope; did you mean 'sin'? 20 | fin >> N >> M; | ^~~ | sin main.cpp:22:5: error: 'vector' was not declared in this scope 22 | vector<Point> centrals(N); | ^~~~~~ main.cpp:22:5: note: suggested alternatives: In file included from /usr/include/c++/12.2.1/vector:64, from main.cpp:2: /usr/include/c++/12.2.1/bits/stl_vector.h:423:11: note: 'std::vector' 423 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/12.2.1/vector:84:13: note: 'std::pmr::vector' 84 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ main.cpp:22:17: error: expected primary-expression before '>' token 22 | vector<Point> centrals(N); | ^ main.cpp:22:19: error: 'centrals' was not declared in this scope 22 | vector<Point> centrals(N); | ^~~~~~~~ main.cpp:23:17: error: expected primary-expression before '>' token 23 | vector<Point> blocks(M); | ^ main.cpp:23:19: error: 'blocks' was not declared in this scope; did you mean 'clock'? 23 | vector<Point> blocks(M); | ^~~~~~ | clock main.cpp:35:12: error: expected primary-expression before 'double' 35 | vector<double> costs; | ^~~~~~ main.cpp:39:13: error: 'costs' was not declared in this scope 39 | costs.push_back(calculateDistance(central, block)); | ^~~~~ main.cpp:43:10: error: 'costs' was not declared in this scope 43 | sort(costs.begin(), costs.end()); | ^~~~~ Non zero exit status: 1

Ceva nu functioneaza?