#2271
ProdMax1
Se dă un șir cu n
numere întregi. Determinați cel mai mare număr care poate fi scris ca produs de două elemente ale șirului.
Problema | ProdMax1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53630709 | Utilizator | |
Fișier | prodmax1.cpp | Dimensiune | 267 B |
Data încărcării | 06 Noiembrie 2024, 21:01 | Scor / rezultat | Eroare de compilare |
prodmax1.cpp: In function 'int main()': prodmax1.cpp:5:9: warning: unused variable 'i' [-Wunused-variable] int n,i,j; ^ prodmax1.cpp:5:11: warning: unused variable 'j' [-Wunused-variable] int n,i,j; ^ 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 prodmax1.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::sort(_RAIter, _RAIter) [with _RAIter = float]': prodmax1.cpp:10:17: required from here /usr/include/c++/4.8/bits/stl_algo.h:5450:2: error: no type named 'value_type' in 'struct std::iterator_traits<float>' _ValueType; ^ /usr/include/c++/4.8/bits/stl_algo.h:5461:31: error: call of overloaded '__lg(float)' is ambiguous std::__lg(__last - __first) * 2); ^ /usr/include/c++/4.8/bits/stl_algo.h:5461:31: 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 prodmax1.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:980:3: note: constexpr int std::__lg(int) __lg(int __n) ^ /usr/include/c++/4.8/bits/stl_algobase.h:984:3: note: constexpr unsigned int std::__lg(unsigned int) __lg(unsigned __n) ^ /usr/include/c++/4.8/bits/stl_algobase.h:988:3: note: constexpr long int std::__lg(long int) __lg(long __n) ^ /usr/include/c++/4.8/bits/stl_algobase.h:992:3: note: constexpr long unsigned int std::__lg(long unsigned int) __lg(unsigned long __n) ^ /usr/include/c++/4.8/bits/stl_algobase.h:996:3: note: constexpr long long int std::__lg(long long int) __lg(long long __n) ^ /usr/include/c++/4.8/bits/stl_algobase.h:1000:3: note: constexpr long long unsigned int std::__lg(long long unsigned int) __lg(unsigned long long __n) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdMax1 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ă.