#4500
Se consideră un șir format din primele N
numere naturale nenule. Să se afle numărul de partiții în 2
submulțimi disjuncte cu suma egală care există pentru acest șir.
Problema | gauss_partitions | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58432353 | Utilizator | |
Fișier | gauss_partitions.cpp | Dimensiune | 454 B |
Data încărcării | 03 Iunie 2025, 23:58 | Scor / rezultat | 60 puncte |
gauss_partitions.cpp: In function 'int main()': gauss_partitions.cpp:11:13: warning: null argument where non-null required (argument 1) [-Wnonnull] printf(0); ^ gauss_partitions.cpp:7:16: warning: unused variable 'k' [-Wunused-variable] int n, i, j, k, g; ^ gauss_partitions.cpp:8:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0.012 secunde | OK. | 10 | 10 | ||
6 | 0.116 secunde | OK. | 10 | 10 | ||
7 | 0.736 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 1.48 secunde | OK. | 10 | 10 | ||
9 | 1.48 secunde | OK. | 10 | 10 | ||
Punctaj total | 60 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema gauss_partitions 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ă.