#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 | #64506355 | Utilizator | |
| Fișier | matriceinteresanta.cpp | Dimensiune | 2.31 KB |
| Data încărcării | 11 Mai 2026, 18:07 | Scor/rezultat | Eroare de compilare |
matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:8:1: note: in expansion of macro ‘long’ 8 | long long rmq[LOG][LOG][NMAX][NMAX]; | ^~~~ matriceinteresanta.cpp:3:14: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:8:6: note: in expansion of macro ‘long’ 8 | long long rmq[LOG][LOG][NMAX][NMAX]; | ^~~~ matriceinteresanta.cpp:3:19: error: duplicate ‘unsigned’ 3 | #define long long unsigned long long | ^~~~~~~~ matriceinteresanta.cpp:8:6: note: in expansion of macro ‘long’ 8 | long long rmq[LOG][LOG][NMAX][NMAX]; | ^~~~ matriceinteresanta.cpp:3:28: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:8:6: note: in expansion of macro ‘long’ 8 | long long rmq[LOG][LOG][NMAX][NMAX]; | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:8:6: note: in expansion of macro ‘long’ 8 | long long rmq[LOG][LOG][NMAX][NMAX]; | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:11:15: note: in expansion of macro ‘long’ 11 | int nrbitiunu(long long aux){ | ^~~~ matriceinteresanta.cpp:3:14: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:11:20: note: in expansion of macro ‘long’ 11 | int nrbitiunu(long long aux){ | ^~~~ matriceinteresanta.cpp:3:19: error: duplicate ‘unsigned’ 3 | #define long long unsigned long long | ^~~~~~~~ matriceinteresanta.cpp:11:20: note: in expansion of macro ‘long’ 11 | int nrbitiunu(long long aux){ | ^~~~ matriceinteresanta.cpp:3:28: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:11:20: note: in expansion of macro ‘long’ 11 | int nrbitiunu(long long aux){ | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:11:20: note: in expansion of macro ‘long’ 11 | int nrbitiunu(long long aux){ | ^~~~ matriceinteresanta.cpp: In function ‘int nrbitiunu(long long unsigned int)’: matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:14:10: note: in expansion of macro ‘long’ 14 | for (long long bit = 1; bit < 1LL << 50; bit <<= 1) { | ^~~~ matriceinteresanta.cpp:3:14: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:14:15: note: in expansion of macro ‘long’ 14 | for (long long bit = 1; bit < 1LL << 50; bit <<= 1) { | ^~~~ matriceinteresanta.cpp:3:19: error: duplicate ‘unsigned’ 3 | #define long long unsigned long long | ^~~~~~~~ matriceinteresanta.cpp:14:15: note: in expansion of macro ‘long’ 14 | for (long long bit = 1; bit < 1LL << 50; bit <<= 1) { | ^~~~ matriceinteresanta.cpp:3:28: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:14:15: note: in expansion of macro ‘long’ 14 | for (long long bit = 1; bit < 1LL << 50; bit <<= 1) { | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:14:15: note: in expansion of macro ‘long’ 14 | for (long long bit = 1; bit < 1LL << 50; bit <<= 1) { | ^~~~ matriceinteresanta.cpp: In function ‘int main()’: matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:61:5: note: in expansion of macro ‘long’ 61 | long long ans = 0; | ^~~~ matriceinteresanta.cpp:3:14: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:61:10: note: in expansion of macro ‘long’ 61 | long long ans = 0; | ^~~~ matriceinteresanta.cpp:3:19: error: duplicate ‘unsigned’ 3 | #define long long unsigned long long | ^~~~~~~~ matriceinteresanta.cpp:61:10: note: in expansion of macro ‘long’ 61 | long long ans = 0; | ^~~~ matriceinteresanta.cpp:3:28: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:61:10: note: in expansion of macro ‘long’ 61 | long long ans = 0; | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:61:10: note: in expansion of macro ‘long’ 61 | long long ans = 0; | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:73:21: note: in expansion of macro ‘long’ 73 | long long mask = 0; | ^~~~ matriceinteresanta.cpp:3:14: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:73:26: note: in expansion of macro ‘long’ 73 | long long mask = 0; | ^~~~ matriceinteresanta.cpp:3:19: error: duplicate ‘unsigned’ 3 | #define long long unsigned long long | ^~~~~~~~ matriceinteresanta.cpp:73:26: note: in expansion of macro ‘long’ 73 | long long mask = 0; | ^~~~ matriceinteresanta.cpp:3:28: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:73:26: note: in expansion of macro ‘long’ 73 | long long mask = 0; | ^~~~ matriceinteresanta.cpp:3:33: error: ‘long long long’ is too long for GCC 3 | #define long long unsigned long long | ^~~~ matriceinteresanta.cpp:73:26: note: in expansion of macro ‘long’ 73 | long long mask = 0; | ^~~~
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ă.