#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 | #57052609 | Utilizator | |
Fișier | dreptunghi2.cpp | Dimensiune | 3.23 KB |
Data încărcării | 14 Martie 2025, 08:42 | Scor / rezultat | 45 puncte |
dreptunghi2.cpp: In function 'nod* creare()': dreptunghi2.cpp:28:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (start < cod.size()) { ^ dreptunghi2.cpp: In function 'void dim(nod*, int, int&, int&)': dreptunghi2.cpp:72:96: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (a->ins[i] != 'V' && a->ins[i] != 'H' && a->ins[i] != '*' && i < a->ins.size()) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 2 | 2 | ||
1 | 0 secunde | OK. | 3 | 3 | ||
2 | 0 secunde | OK. | 4 | 4 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | OK. | 2 | 2 | ||
5 | 0 secunde | OK. | 3 | 3 | ||
6 | 0 secunde | OK. | 4 | 4 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | OK. | 2 | 2 | ||
9 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
10 | 0 secunde | OK. | 4 | 4 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | OK. | 2 | 2 | ||
13 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
14 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | OK. | 2 | 2 | ||
17 | 0 secunde | OK. | 3 | 3 | ||
18 | 0 secunde | OK. | 4 | 4 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
20 | 0 secunde | OK. | 2 | 2 | ||
21 | 0 secunde | OK. | 3 | 3 | ||
22 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
23 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
24 | 0 secunde | OK. | 2 | 2 | ||
25 | 0 secunde | OK. | 3 | 3 | ||
26 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
27 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
Punctaj total | 45 |
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ă.