#1661
Fotbal1
Se dau 2
numere reprezentând scorul la fotbalul extraterestru. Să se afișeze în câte moduri poți ajunge la acel scor.
Problema | Fotbal1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 64 MB
|
Id soluție | #49451218 | Utilizator | |
Fișier | fotbal1.cpp | Dimensiune | 2.96 KB |
Data încărcării | 02 Martie 2024, 12:36 | Scor / rezultat | Eroare de compilare |
fotbal1.cpp:21:63: error: wrong number of template arguments (0, should be 1) priority_queue<pair<ll, bool>, vector<pair<ll, bool>>, greater<>> pro; ^ In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, 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 fotbal1.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:222:12: error: provided for 'template<class _Tp> struct std::greater' struct greater : public binary_function<_Tp, _Tp, bool> ^ fotbal1.cpp:21:64: error: template argument 3 is invalid priority_queue<pair<ll, bool>, vector<pair<ll, bool>>, greater<>> pro; ^ fotbal1.cpp:21:70: error: invalid type in declaration before ';' token priority_queue<pair<ll, bool>, vector<pair<ll, bool>>, greater<>> pro; ^ fotbal1.cpp: In function 'int main()': fotbal1.cpp:71:17: error: request for member 'empty' in 'pro', which is of non-class type 'int' if( pro.empty() || i.st <= pro.top().q ){ ^ fotbal1.cpp:71:40: error: request for member 'top' in 'pro', which is of non-class type 'int' if( pro.empty() || i.st <= pro.top().q ){ ^ fotbal1.cpp:72:17: error: request for member 'emplace' in 'pro', which is of non-class type 'int' pro.emplace(i.en, i.pic); ^ fotbal1.cpp:82:25: error: request for member 'empty' in 'pro', which is of non-class type 'int' while( !pro.empty() && i.st > pro.top().q ){ ^ fotbal1.cpp:82:47: error: request for member 'top' in 'pro', which is of non-class type 'int' while( !pro.empty() && i.st > pro.top().q ){ ^ fotbal1.cpp:83:25: error: request for member 'top' in 'pro', which is of non-class type 'int' if( pro.top().w == 1 ) pic1new--; ^ fotbal1.cpp:85:21: error: request for member 'pop' in 'pro', which is of non-class type 'int' pro.pop(); ^ fotbal1.cpp:88:17: error: request for member 'emplace' in 'pro', which is of non-class type 'int' pro.emplace(i.en, i.pic); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fotbal1 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ă.