#4652
Scrieţi un program care, cunoscând n şi m (dimensiunile picturii), respectiv înălţimile pixelilor 3D, rezolvă următoarele trei cerinţe:
1. determină numărul maxim de culori pure care se combină pe un pixel 3D;
2. determină numărul de culori distincte care apar în pictura creată conform algoritmului aplicat de robotul Vasile;
3. determină dimensiunea maximă a unei zone formată din pixeli 3D de aceeaşi culoare, diferită de alb.
ONI 2024, clasa a 7-a
| Problema | pictura | Operații I/O |
pictura.in/pictura.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63608317 | Utilizator | |
| Fișier | pictura.cpp | Dimensiune | 2.71 KB |
| Data încărcării | 11 Martie 2026, 10:37 | Scor/rezultat | 18 puncte |
pictura.cpp: In function 'int main()': pictura.cpp:31:31: warning: unused variable 'l' [-Wunused-variable] int c,i,j,max=0,cul=0,l,r=0,x,y; ^ pictura.cpp:31:33: warning: unused variable 'r' [-Wunused-variable] int c,i,j,max=0,cul=0,l,r=0,x,y; ^ pictura.cpp:31:37: warning: unused variable 'x' [-Wunused-variable] int c,i,j,max=0,cul=0,l,r=0,x,y; ^ pictura.cpp:31:39: warning: unused variable 'y' [-Wunused-variable] int c,i,j,max=0,cul=0,l,r=0,x,y; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 2 | 2 | ||
| 2 | 0.008 secunde | OK. | 2 | 2 | ||
| 3 | 0.088 secunde | OK. | 2 | 2 | ||
| 4 | Depășit | Limita de timp depășită | 2 | 0 | ||
| 5 | 0.016 secunde | OK. | 2 | 2 | ||
| 6 | 0.048 secunde | OK. | 2 | 2 | ||
| 7 | 0.012 secunde | OK. | 2 | 2 | ||
| 8 | Depășit | Limita de timp depășită | 2 | 0 | ||
| 9 | 0.012 secunde | Raspuns gresit. | 2 | 0 | ||
| 10 | 0 secunde | OK. | 3 | 3 | ||
| 11 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 12 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 13 | 0.076 secunde | OK. | 3 | 3 | ||
| 14 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
| 15 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
| 16 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 17 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 18 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 19 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 20 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 21 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 22 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 23 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 24 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 25 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 26 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 27 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 28 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 29 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 30 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 31 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 32 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
| 33 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 34 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| Punctaj total | 18 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pictura 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ă.