#2709
Se organizează o excursie cu n participanți cu numere de ordine unice de la 1 la n pentru care se folosesc 3 mijloace de transport. Să se determine dacă se pot aranja participanții astfel încât suma numerelor de ordine din cele 3 mașini să fie aceeași. Dacă este posibilă aranjarea, se vor afișa pe 3 linii numerele de ordine separate prin spații, numerele dintr-o mașină pe câte un rând, altfel se afișează NU.
| Problema | Excursie2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 8 MB
/
Stivă 8 MB
|
| Id soluție | #64344529 | Utilizator | |
| Fișier | excursie2.cpp | Dimensiune | 1.93 KB |
| Data încărcării | 30 Aprilie 2026, 17:28 | Scor/rezultat | 40 puncte |
excursie2.cpp: In function ‘int main()’: excursie2.cpp:18:10: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(i = 1; i <= n; i += 6) | ^~~ excursie2.cpp:20:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | cout << '\n'; | ^~~~ excursie2.cpp:21:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 21 | for(i = 2; i <= n; i += 6) | ^~~ excursie2.cpp:23:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 23 | cout << '\n'; | ^~~~ excursie2.cpp:34:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 34 | for(i = 2; i <= n; i += 5) | ^~~ excursie2.cpp:36:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 36 | cout << '\n'; | ^~~~ excursie2.cpp:44:12: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 44 | for(i = 1; i <= n; i += 8) | ^~~ excursie2.cpp:46:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 46 | cout << '\n'; | ^~~~ excursie2.cpp:47:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 47 | for(i = 2; i <= n; i += 8) | ^~~ excursie2.cpp:49:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 49 | cout << '\n'; | ^~~~ excursie2.cpp:57:12: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 57 | for(i = 1; i <= n; i += 9) | ^~~ excursie2.cpp:59:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 59 | cout << '\n'; | ^~~~ excursie2.cpp:60:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 60 | for(i = 2; i <= n; i += 9) | ^~~ excursie2.cpp:62:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 62 | cout << '\n'; | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Most Impressive! | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | Impressive! | 10 | 10 | Exemplu | |
| 3 | 0.001 secunde | Impressive! | 10 | 10 | ||
| 4 | 0.001 secunde | I gave up myself! | 10 | 0 | ||
| 5 | 0.001 secunde | Not that impressive! | 10 | 0 | ||
| 6 | 0.001 secunde | Impressive! | 10 | 10 | ||
| 7 | 0.001 secunde | Not that impressive! | 10 | 0 | ||
| 8 | 0.001 secunde | I gave up myself! | 10 | 0 | ||
| 9 | 0.001 secunde | I gave up myself! | 10 | 0 | ||
| 10 | 0.001 secunde | Not that impressive! | 10 | 0 | ||
| Punctaj total | 40 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Excursie2 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ă.