#3534
Definiți în C++ clasa Multiset care va implementa multiset-uri de numere naturale în care se definesc operațiile:
Insert(x)
– inserează x
în multisetErase(x)
– elimină elementul de pe pozitia x
din multisetFind(x)
– returnează valoarea de pe pozitia x
din multisetProblema | Multiset_OOP | Operații I/O |
![]() multiset_oop.in /multiset_oop.out
|
---|---|---|---|
Limita timp | 0.35 secunde | Limita memorie |
Total: 30 MB
/
Stivă 5 MB
|
Id soluție | #58403171 | Utilizator | |
Fișier | multiset_oop.cpp | Dimensiune | 382 B |
Data încărcării | 02 Iunie 2025, 09:48 | Scor / rezultat | Eroare de compilare |
multiset_oop.cpp:11:17: error: ISO C++ forbids declaration of 'Insert' with no type [-fpermissive] Insert(int k) ^ multiset_oop.cpp:15:17: error: ISO C++ forbids declaration of 'Find' with no type [-fpermissive] Find(int poz) ^ multiset_oop.cpp:21:18: error: ISO C++ forbids declaration of 'Erase' with no type [-fpermissive] Erase(int poz) ^ multiset_oop.cpp: In member function 'int Multiset::Insert(int)': multiset_oop.cpp:14:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ multiset_oop.cpp: In member function 'int Multiset::Erase(int)': multiset_oop.cpp:25:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ multiset_oop.cpp: In function 'int main()': multiset_oop.cpp:55:43: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("multiset_oop.in", "r", stdin); ^ multiset_oop.cpp:56:45: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("multiset_oop.out", "w", stdout); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Multiset_OOP 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ă.