#2170
dreptc
n
puncte colorate dispuse în plan. Ele sunt identificate prin coordonatele lor întregi, pe axele OX
și OY
. Fiecare punct are asociat un număr natural între 1
și C
reprezentând codul culorii lui. Un dreptunghi se numește corect dacă îndeplinește simultan următoare condiții:
n
puncte date;OX
, OY
;Să se determine numărul maxim de dreptunghiuri corecte care se pot forma cu cele n
puncte din plan.
Problema | dreptc | Operații I/O |
dreptc.in /dreptc.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48623525 | Utilizator | |
Fișier | dreptc.cpp | Dimensiune | 2.07 KB |
Data încărcării | 31 Ianuarie 2024, 12:07 | Scor / rezultat | 30 puncte |
dreptc.cpp: In function 'void Contorizare(int)': dreptc.cpp:39:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( i < it->second.size() && j < it2->second.size() ) ^ dreptc.cpp:39:70: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( i < it->second.size() && j < it2->second.size() ) ^ dreptc.cpp:41:81: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( it->second[i] < it2->second[j]&& i < it->second.size() ) ^ dreptc.cpp:43:83: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( it->second[i] > it2->second[j] && j < it2->second.size() ) ^ dreptc.cpp:45:83: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( it->second[i] == it2->second[j] && i < it->second.size() && j < it2->second.size() ) ^ dreptc.cpp:45:109: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( it->second[i] == it2->second[j] && i < it->second.size() && j < it2->second.size() ) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | Depășit | Limita de timp depășită | 10 | 0 | ||
9 | Depășit | Limita de timp depășită | 10 | 0 | ||
Punctaj total | 30 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema dreptc 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ă.