#941
În preajma Crăciunului toţi suntem sau redevenim copii.
Scrie un program care afişează pe ecran o urare pentru cei dragi ţie!
| Problema | Urare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64864398 | Utilizator | |
| Fișier | urare.cpp | Dimensiune | 3.31 KB |
| Data încărcării | 08 Iunie 2026, 11:14 | Scor/rezultat | 100 puncte |
urare.cpp: In function ‘int main()’: urare.cpp:85:24: warning: statement has no effect [-Wunused-value] 85 | Table[1] == 0; | ~~~~~~~~~^~~~ urare.cpp:91:24: warning: statement has no effect [-Wunused-value] 91 | Table[2] == 0; | ~~~~~~~~~^~~~ urare.cpp:97:24: warning: statement has no effect [-Wunused-value] 97 | Table[3] == 0; | ~~~~~~~~~^~~~ urare.cpp:103:24: warning: statement has no effect [-Wunused-value] 103 | Table[4] == 0; | ~~~~~~~~~^~~~ urare.cpp: In function ‘void Table_Show()’: urare.cpp:44:20: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations] 44 | if (Table[i] % 10 == 4) cout << "diamonds"; | ~~~~~~~^ urare.cpp:25:23: note: within this loop 25 | for (int i = 1; i <= 4; i++) | ~~^~~~ urare.cpp: In function ‘int main()’: urare.cpp:58:20: warning: array subscript 45 is outside array bounds of ‘int [44]’ [-Warray-bounds=] 58 | random_shuffle(Deck + 1, Deck + 45); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ urare.cpp:3:5: note: at offset 180 into object ‘Deck’ of size 176 3 | int Deck[44]; | ^~~~ urare.cpp:63:17: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 63 | if (Table[4] == 0) Table[4] = Deck[k++]; | ~~~~~~~^ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~ urare.cpp:63:32: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 63 | if (Table[4] == 0) Table[4] = Deck[k++]; | ~~~~~~~^ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~ urare.cpp:67:88: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 67 | cout << Table[1] << " " << Table[2] << " " << Table[3] << " " << Table[4] << '\n'; | ^~~~ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~ urare.cpp:74:25: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 74 | if (Table[4] == 0) Table[4] = Deck[k++]; | ~~~~~~~^ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~ urare.cpp:74:40: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 74 | if (Table[4] == 0) Table[4] = Deck[k++]; | ~~~~~~~^ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~ urare.cpp:102:26: warning: array subscript 4 is above array bounds of ‘int [4]’ [-Warray-bounds=] 102 | Card_Action(Table[4]); | ~~~~~~~~~~~^~~~~~~~~~ urare.cpp:4:5: note: while referencing ‘Table’ 4 | int Table[4]; | ^~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | In numele celor dragi tie, iti multumim pentru urare! | 100 | 100 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Urare 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ă.