#301
Se dau n numere naturale cu cel mult două cifre fiecare. Afişaţi valorile distincte în ordinea descrescătoare a numărului de apariţii.
| Problema | Frecventa1 | Operații I/O |
frecventa1.in/frecventa1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64811048 | Utilizator | |
| Fișier | frecventa1.cpp | Dimensiune | 829 B |
| Data încărcării | 02 Iunie 2026, 20:25 | Scor/rezultat | 100 puncte |
frecventa1.cpp: In function ‘int main()’: frecventa1.cpp:14:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | for(j=1;j<=ct;j++) | ^~~ frecventa1.cpp:21:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 21 | if(ok==0) | ^~ frecventa1.cpp:30:40: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 30 | if(a[i]<a[j] || a[i]==a[j] && v[i]>v[j]) | ~~~~~~~~~~~^~~~~~~~~~~~ frecventa1.cpp:29:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 29 | for(j=i+1;j<=ct;j++) | ^~~ frecventa1.cpp:35:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 35 | for(i=1;i<=ct;i++) | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.009 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Frecventa1 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ă.