#264
Se dau mai multe numere naturale formate din exact o cifră. Determinaţi cifrele cu număr maxim de apariţii.
| Problema | MaxCif | Operații I/O |
maxcif.in/maxcif.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64097294 | Utilizator | |
| Fișier | maxcif.cpp | Dimensiune | 494 B |
| Data încărcării | 16 Aprilie 2026, 19:25 | Scor/rezultat | 20 puncte |
maxcif.cpp: In function ‘int main()’: maxcif.cpp:11:31: warning: variable ‘max2’ set but not used [-Wunused-but-set-variable] 11 | int x, v[11]={0}, max1=0, max2, pozmax1, pozmax2; | ^~~~ maxcif.cpp:26:31: warning: ‘pozmax1’ may be used uninitialized [-Wmaybe-uninitialized] 26 | fout << pozmax2 << " " << pozmax1; | ^~~~~~~ maxcif.cpp:11:37: note: ‘pozmax1’ was declared here 11 | int x, v[11]={0}, max1=0, max2, pozmax1, pozmax2; | ^~~~~~~ maxcif.cpp:26:24: warning: ‘pozmax2’ may be used uninitialized [-Wmaybe-uninitialized] 26 | fout << pozmax2 << " " << pozmax1; | ^~~ maxcif.cpp:11:46: note: ‘pozmax2’ was declared here 11 | int x, v[11]={0}, max1=0, max2, pozmax1, pozmax2; | ^~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.005 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxCif 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ă.