#3740
void AdaugareFinal(nod * & prim , nod * & ultim, int x);
care adaugă valoarea x la sfârșitul listei pentru care primul element are adresa memorată în pointerul prim si ultimul element are adresa memorata in pointerul ultim .
| Problema | FAdaugareFinalLLDI | Operații I/O |
fadaugarefinal.in/fadaugarefinal.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64502236 | Utilizator | |
| Fișier | fadaugarefinallldi.cpp | Dimensiune | 995 B |
| Data încărcării | 11 Mai 2026, 14:46 | Scor/rezultat | Eroare de compilare |
fadaugarefinallldi.cpp:36:8: error: redefinition of ‘struct nod’ 36 | struct nod{ | ^~~ fadaugarefinallldi.cpp:7:8: note: previous definition of ‘struct nod’ 7 | struct nod | ^~~ fadaugarefinallldi.cpp: In function ‘void AdaugareFinal(nod*&, nod*&, int)’: fadaugarefinallldi.cpp:52:9: error: ‘q’ was not declared in this scope 52 | q = new nod; | ^ fadaugarefinallldi.cpp:55:20: error: ‘utl’ was not declared in this scope 55 | q -> ant = utl; | ^~~ fadaugarefinallldi.cpp: At global scope: fadaugarefinallldi.cpp:60:5: error: redefinition of ‘int main()’ 60 | int main() | ^~~~ fadaugarefinallldi.cpp:17:5: note: ‘int main()’ previously defined here 17 | int main() | ^~~~ fadaugarefinallldi.cpp: In function ‘int main()’: fadaugarefinallldi.cpp:63:9: error: ‘i’ was not declared in this scope 63 | for(i = 1; i <=3; i++) | ^ fadaugarefinallldi.cpp:64:16: error: ‘a’ was not declared in this scope 64 | cin >> a[i]; | ^ fadaugarefinallldi.cpp:65:12: error: no matching function for call to ‘get()’ 65 | cin,get(); | ~~~^~ In file included from /usr/include/c++/13/bits/stl_algobase.h:64, from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from fadaugarefinallldi.cpp:1: /usr/include/c++/13/bits/stl_pair.h:1035:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(pair<_Tp1, _Tp2>&)’ 1035 | get(pair<_Tp1, _Tp2>& __in) noexcept | ^~~ /usr/include/c++/13/bits/stl_pair.h:1035:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/bits/stl_pair.h:1040:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(pair<_Tp1, _Tp2>&&)’ 1040 | get(pair<_Tp1, _Tp2>&& __in) noexcept | ^~~ /usr/include/c++/13/bits/stl_pair.h:1040:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/bits/stl_pair.h:1045:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const pair<_Tp1, _Tp2>&)’ 1045 | get(const pair<_Tp1, _Tp2>& __in) noexcept | ^~~ /usr/include/c++/13/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/bits/stl_pair.h:1050:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(const pair<_Tp1, _Tp2>&&)’ 1050 | get(const pair<_Tp1, _Tp2>&& __in) noexcept | ^~~ /usr/include/c++/13/bits/stl_pair.h:1050:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ In file included from /usr/include/c++/13/functional:53, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53: /usr/include/c++/13/tuple:1803:5: note: candidate: ‘template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Types ...> >& std::get(tuple<_Types ...>&)’ 1803 | get(tuple<_Elements...>& __t) noexcept | ^~~ /usr/include/c++/13/tuple:1803:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/tuple:1809:5: note: candidate: ‘template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Types ...> >& std::get(const tuple<_Types ...>&)’ 1809 | get(const tuple<_Elements...>& __t) noexcept | ^~~ /usr/include/c++/13/tuple:1809:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/tuple:1815:5: note: candidate: ‘template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Types ...> >&& std::get(tuple<_Types ...>&&)’ 1815 | get(tuple<_Elements...>&& __t) noexcept | ^~~ /usr/include/c++/13/tuple:1815:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/tuple:1824:5: note: candidate: ‘template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Types ...> >&& std::get(const tuple<_Types ...>&&)’ 1824 | get(const tuple<_Elements...>&& __t) noexcept | ^~~ /usr/include/c++/13/tuple:1824:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/tuple:1834:5: note: candidate: ‘template<long unsigned int __i, class ... _Elements> constexpr std::__enable_if_t<(__i >= sizeof... (_Types))> std::get(const tuple<_Types ...>&)’ (deleted) 1834 | get(const tuple<_Elements...>&) = delete; | ^~~ /usr/include/c++/13/tuple:1834:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:63: /usr/include/c++/13/array:384:5: note: candidate: ‘template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr _Tp& std::get(array<_Tp, _Nm>&)’ 384 | get(array<_Tp, _Nm>& __arr) noexcept | ^~~ /usr/include/c++/13/array:384:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/array:393:5: note: candidate: ‘template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr _Tp&& std::get(array<_Tp, _Nm>&&)’ 393 | get(array<_Tp, _Nm>&& __arr) noexcept | ^~~ /usr/include/c++/13/array:393:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/array:402:5: note: candidate: ‘template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr const _Tp& std::get(const array<_Tp, _Nm>&)’ 402 | get(const array<_Tp, _Nm>& __arr) noexcept | ^~~ /usr/include/c++/13/array:402:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ /usr/include/c++/13/array:411:5: note: candidate: ‘template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr const _Tp&& std::get(const array<_Tp, _Nm>&&)’ 411 | get(const array<_Tp, _Nm>&& __arr) noexcept | ^~~ /usr/include/c++/13/array:411:5: note: template argument deduction/substitution failed: fadaugarefinallldi.cpp:65:12: note: candidate expects 1 argument, 0 provided 65 | cin,get(); | ~~~^~ fadaugarefinallldi.cpp:66:14: error: ‘S’ was not declared in this scope 66 | cin. get(S, 101); | ^ fadaugarefinallldi.cpp:67:5: error: ‘k’ was not declared in this scope 67 | k = 1; | ^ fadaugarefinallldi.cpp:68:5: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 68 | j = 0; | ^ | jn fadaugarefinallldi.cpp:75:24: error: ‘a’ was not declared in this scope 75 | if((S[i] + a[k++]) > 'Z') | ^ fadaugarefinallldi.cpp:77:17: error: ‘x’ was not declared in this scope 77 | x = (S[i] + a[k]) - 'Z'; | ^ fadaugarefinallldi.cpp:78:17: error: ‘b’ was not declared in this scope 78 | b[j++] = 'A' + x; | ^ fadaugarefinallldi.cpp:81:17: error: ‘b’ was not declared in this scope 81 | b[j++] = S [i] + a[k++]; | ^ fadaugarefinallldi.cpp:84:5: error: ‘b’ was not declared in this scope 84 | b[j] = '\0'; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FAdaugareFinalLLDI face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.