Se dă un șir de numere asupra căruia se pot face două tipuri de operații: actualizare a unui interval (schimbarea valorii tuturor elementelor aflate între două poziții date) și interogarea unui interval (determinarea celei mai mici valori aflate între două poziții date).
Problema | Actualizare Interval, Minim Interval | Operații I/O |
aimi.in /aimi.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53780390 | Utilizator | |
Fișier | actualizare_interval,_minim_interval.cpp | Dimensiune | 1.79 KB |
Data încărcării | 11 Noiembrie 2024, 16:50 | Scor / rezultat | Eroare de compilare |
actualizare_interval,_minim_interval.cpp: In function 'void suma(int, int, int, int, int)': actualizare_interval,_minim_interval.cpp:43:29: error: no matching function for call to 'min(long long int&, int&)' minim=min(minim,s[i]); ^ actualizare_interval,_minim_interval.cpp:43:29: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from actualizare_interval,_minim_interval.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: actualizare_interval,_minim_interval.cpp:43:29: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') minim=min(minim,s[i]); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from actualizare_interval,_minim_interval.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: actualizare_interval,_minim_interval.cpp:43:29: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') minim=min(minim,s[i]); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from actualizare_interval,_minim_interval.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4221:5: note: template argument deduction/substitution failed: actualizare_interval,_minim_interval.cpp:43:29: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' minim=min(minim,s[i]); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from actualizare_interval,_minim_interval.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4226:5: note: template argument deduction/substitution failed: actualizare_interval,_minim_interval.cpp:43:29: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' minim=min(minim,s[i]); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Actualizare Interval, Minim Interval face parte din prima categorie. 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ă.