#1366
Se dau n numere întregi. Să se insereze între oricare două numere de aceeași paritate media lor aritmetică. Să se realizeze acest procedeu până nu se mai pot adăuga noi elemente.
| Problema | aceeasi_paritate_2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64570696 | Utilizator | |
| Fișier | aceeasi_paritate_2.cpp | Dimensiune | 757 B |
| Data încărcării | 14 Mai 2026, 22:57 | Scor/rezultat | 20 puncte |
aceeasi_paritate_2.cpp: In function ‘int main()’: aceeasi_paritate_2.cpp:13:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 13 | for(int i=0; i<v.size(); i++){; | ~^~~~~~~~~ aceeasi_paritate_2.cpp:25:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 25 | for(int i=0; i<v.size()-1; i++){ | ~^~~~~~~~~~~ aceeasi_paritate_2.cpp:36:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 36 | for(int i=0; i<v.size(); i++){ | ~^~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema aceeasi_paritate_2 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ă.