Borderou de evaluare (job #2589950)

Utilizator segtreapMihnea Andreescu segtreap Data 27 martie 2020 11:20:54
Problema Stalpi3 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:12:1: error: 'vector' does not name a type vector<pair<int, int>> a[K]; ^~~~~~ main.cpp:13:1: error: 'vector' does not name a type vector<pair<int, int>> b[K]; ^~~~~~ main.cpp: In function 'int main()': main.cpp:23:5: error: 'a' was not declared in this scope a[c].push_back({x, i}); ^ main.cpp:28:5: error: 'b' was not declared in this scope b[c].push_back({x, i}); ^ main.cpp:31:10: error: 'a' was not declared in this scope sort(a[i].begin(), a[i].end()); ^ main.cpp:32:10: error: 'b' was not declared in this scope sort(b[i].begin(), b[i].end()); ^ main.cpp:34:3: error: 'vector' was not declared in this scope vector<pair<int, int>> print; ^~~~~~ main.cpp:34:23: error: expected primary-expression before '>' token vector<pair<int, int>> print; ^~ main.cpp:34:26: error: 'print' was not declared in this scope vector<pair<int, int>> print; ^~~~~ main.cpp:36:20: error: 'a' was not declared in this scope for (int i = 1; !a[i].empty(); i++) { ^ main.cpp:41:28: error: 'b' was not declared in this scope while (j + 1 < (int) b[i].size() && b[i][j + 1].first <= it.first) { ^ main.cpp:44:31: error: 'b' was not declared in this scope if (0 <= j && j < (int) b[i].size()) { ^ main.cpp:45:58: error: 'fabs' was not declared in this scope cur = min(cur, (ld) fabs(it.first - b[i][j].first)); ^ main.cpp:47:42: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and '<brace-enclosed initializer list>') ps = {it.second, b[i][j].second}; ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:1: /usr/include/c++/6/bits/stl_pair.h:363:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__wrap_nonesuch&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__wrap_nonesuch&>::type = const std::pair<int, int>&] Non zero exit status: 1

Ceva nu functioneaza?