#3724
Se dă un cod de segmentare și numerotare și se cere să se afle:
1. numărul de subdiviziuni pe care acesta le generează;
2. dimensiunile unui dreptunghi de arie minimă pentru care acest cod este valid;
3. numărul de codificări distincte modulo 1.000.000.007
, echivalente cu codul citit (în acest număr va fi inclus și codul inițial);
4. primul cod în ordine lexicografică echivalent cu cel dat.
OJI 2021, clasele XI-XII
Problema | Dreptunghi2 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 256 MB
/
Stivă 8 MB
|
Id soluție | #57041375 | Utilizator | |
Fișier | dreptunghi2.cpp | Dimensiune | 2.01 KB |
Data încărcării | 13 Martie 2025, 18:31 | Scor / rezultat | 9 puncte |
dreptunghi2.cpp: In function 'int main()': dreptunghi2.cpp:58:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=0; i<strlen(s); i++) ^ dreptunghi2.cpp:54:12: warning: unused variable 'i' [-Wunused-variable] int c, i, j; ^ dreptunghi2.cpp:54:15: warning: unused variable 'j' [-Wunused-variable] int c, i, j; ^ dreptunghi2.cpp: In function 'void Cautare(nod*)': dreptunghi2.cpp:35:25: warning: array subscript is above array bounds [-Warray-bounds] if (v[r->info][2]==1) ^ dreptunghi2.cpp: In function 'int main()': dreptunghi2.cpp:63:20: warning: array subscript is above array bounds [-Warray-bounds] v[nr][2]=0; ^ dreptunghi2.cpp:68:20: warning: array subscript is above array bounds [-Warray-bounds] v[nr][2]=2; ^ dreptunghi2.cpp:85:20: warning: array subscript is above array bounds [-Warray-bounds] v[nr][2]=1; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
1 | 0 secunde | OK. | 3 | 3 | ||
2 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
14 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
17 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
18 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
20 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
21 | 0 secunde | OK. | 3 | 3 | ||
22 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
23 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
24 | 0 secunde | Raspuns gresit. | 2 | 0 | ||
25 | 0 secunde | OK. | 3 | 3 | ||
26 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
27 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
Punctaj total | 9 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Dreptunghi2 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ă.