#4841
În urma petrecerii de ziua lui RAU-Gigel, copiii au primit atâtea bomboane încât au câștigat o energie debordantă – așa că l-au provocat pe RAU-Gigel la un concurs de … numărat!
Acestora li se dă o matrice cu N
linii și M
coloane, în care fiecare element este un număr natural nenul. Obiectivul lor este să determine câte submatrice (sub-dreptunghiuri formate din linii și coloane contigue) conțin exact K
valori distincte.
RAU-Coder 2025
Problema | MatriceInteresanta | Operații I/O |
![]() matriceinteresanta.in /matriceinteresanta.out
|
---|---|---|---|
Limita timp | 2 secunde | Limita memorie |
Total: 128 MB
/
Stivă 32 MB
|
Id soluție | #58472155 | Utilizator | |
Fișier | matriceinteresanta.cpp | Dimensiune | 1.69 KB |
Data încărcării | 08 Iunie 2025, 20:20 | Scor / rezultat | Eroare de compilare |
matriceinteresanta.cpp: In function 'long long int count_at_most(int)': matriceinteresanta.cpp:31:27: error: expected unqualified-id before '[' token for (auto [v, cnt] : colFreq[right]) { ^ matriceinteresanta.cpp:31:27: error: expected ';' before '[' token matriceinteresanta.cpp:31:28: error: 'v' was not declared in this scope for (auto [v, cnt] : colFreq[right]) { ^ matriceinteresanta.cpp:31:31: error: 'cnt' was not declared in this scope for (auto [v, cnt] : colFreq[right]) { ^ matriceinteresanta.cpp: In lambda function: matriceinteresanta.cpp:31:36: error: expected '{' before ':' token for (auto [v, cnt] : colFreq[right]) { ^ matriceinteresanta.cpp: In function 'long long int count_at_most(int)': matriceinteresanta.cpp:31:36: error: expected ';' before ':' token matriceinteresanta.cpp:31:36: error: expected primary-expression before ':' token matriceinteresanta.cpp:31:36: error: expected ')' before ':' token matriceinteresanta.cpp:31:36: error: expected primary-expression before ':' token matriceinteresanta.cpp:31:36: error: expected ';' before ':' token matriceinteresanta.cpp:38:31: error: expected unqualified-id before '[' token for (auto [v, cnt] : colFreq[left]) { ^ matriceinteresanta.cpp:38:31: error: expected ';' before '[' token matriceinteresanta.cpp:38:32: error: 'v' was not declared in this scope for (auto [v, cnt] : colFreq[left]) { ^ matriceinteresanta.cpp:38:35: error: 'cnt' was not declared in this scope for (auto [v, cnt] : colFreq[left]) { ^ matriceinteresanta.cpp: In lambda function: matriceinteresanta.cpp:38:40: error: expected '{' before ':' token for (auto [v, cnt] : colFreq[left]) { ^ matriceinteresanta.cpp: In function 'long long int count_at_most(int)': matriceinteresanta.cpp:38:40: error: expected ';' before ':' token matriceinteresanta.cpp:38:40: error: expected primary-expression before ':' token matriceinteresanta.cpp:38:40: error: expected ')' before ':' token matriceinteresanta.cpp:38:40: error: expected primary-expression before ':' token matriceinteresanta.cpp:38:40: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MatriceInteresanta 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ă.