#2779
cntSQ
Se dă o matrice binară (valori 0
și 1
). Să se determine câte pătrate exista cu proprietatea că acestea au pe marginea lor doar valori 1
.
Problema | cntSQ | Operații I/O |
cntsq.in /cntsq.out
|
---|---|---|---|
Limita timp | 0.15 secunde | Limita memorie |
Total: 32 MB
/
Stivă 8 MB
|
Id soluție | #48785889 | Utilizator | |
Fișier | cntsq.cpp | Dimensiune | 3.22 KB |
Data încărcării | 05 Februarie 2024, 16:54 | Scor / rezultat | 60 puncte |
cntsq.cpp: In function 'int main()': cntsq.cpp:135:73: warning: narrowing conversion of 'poz' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 2, poz + sus[i][j] - 1}); ^ cntsq.cpp:135:45: warning: narrowing conversion of '((i - j) + m)' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 2, poz + sus[i][j] - 1}); ^ cntsq.cpp:135:69: warning: narrowing conversion of '((((int)sus[i][j]) + poz) + -1)' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 2, poz + sus[i][j] - 1}); ^ cntsq.cpp:136:53: warning: narrowing conversion of 'poz' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 1, poz}); ^ cntsq.cpp:136:41: warning: narrowing conversion of '((i - j) + m)' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 1, poz}); ^ cntsq.cpp:136:53: warning: narrowing conversion of 'poz' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz, i - j + m, 1, poz}); ^ cntsq.cpp:137:34: warning: narrowing conversion of '(poz - ((int)jos[i][j]))' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz - jos[i][j], i - j + m, -1, poz}); ^ cntsq.cpp:137:53: warning: narrowing conversion of '((i - j) + m)' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz - jos[i][j], i - j + m, -1, poz}); ^ cntsq.cpp:137:66: warning: narrowing conversion of 'poz' from 'int' to 'short int' inside { } [-Wnarrowing] sweep.push_back({poz - jos[i][j], i - j + m, -1, poz}); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0.008 secunde | OK. | 10 | 10 | ||
5 | 0.04 secunde | OK. | 10 | 10 | ||
6 | 0.072 secunde | OK. | 10 | 10 | ||
7 | 0.044 secunde | Caught fatal signal 11 | 10 | 0 | ||
8 | 0.044 secunde | Caught fatal signal 11 | 10 | 0 | ||
9 | 0.04 secunde | Caught fatal signal 11 | 10 | 0 | ||
10 | 0.04 secunde | Caught fatal signal 11 | 5 | 0 | ||
11 | 0.044 secunde | Caught fatal signal 11 | 5 | 0 | ||
Punctaj total | 60 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cntSQ 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ă.