#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 | #15596469 | Utilizator | |
Fișier | cntsq.cpp | Dimensiune | 2.97 KB |
Data încărcării | 29 Aprilie 2019, 16:58 | Scor / rezultat | Eroare de compilare |
cntsq.cpp:10:17: error: 'vf' was not declared in this scope priority_queue <vf> Q; ^ cntsq.cpp:10:19: error: template argument 1 is invalid priority_queue <vf> Q; ^ cntsq.cpp:10:19: error: template argument 2 is invalid cntsq.cpp:10:19: error: template argument 3 is invalid cntsq.cpp:10:22: error: invalid type in declaration before ';' token priority_queue <vf> Q; ^ cntsq.cpp: In function 'int main()': cntsq.cpp:69:11: error: request for member 'clear' in 'Q', which is of non-class type 'int' Q.clear(); ^ cntsq.cpp:76:26: error: request for member 'empty' in 'Q', which is of non-class type 'int' while(!Q.empty()) ^ cntsq.cpp:78:30: error: request for member 'top' in 'Q', which is of non-class type 'int' vf oth=Q.top(); ^ cntsq.cpp:81:27: error: request for member 'pop' in 'Q', which is of non-class type 'int' Q.pop(); ^ cntsq.cpp:89:19: error: request for member 'push' in 'Q', which is of non-class type 'int' Q.push({x,y}); ^ cntsq.cpp:102:11: error: request for member 'clear' in 'Q', which is of non-class type 'int' Q.clear(); ^ cntsq.cpp:109:26: error: request for member 'empty' in 'Q', which is of non-class type 'int' while(!Q.empty()) ^ cntsq.cpp:111:30: error: request for member 'top' in 'Q', which is of non-class type 'int' vf oth=Q.top(); ^ cntsq.cpp:114:27: error: request for member 'pop' in 'Q', which is of non-class type 'int' Q.pop(); ^ cntsq.cpp:37:13: warning: unused variable 's' [-Wunused-variable] int n,m,s,i,j,rez=0,x,y,ct; ^ cntsq.cpp:38:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("cntsq.in","r",stdin); ^ cntsq.cpp:39:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("cntsq.out","w",stdout); ^ cntsq.cpp:40:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d\n",&n,&m); ^ cntsq.cpp:43:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%c",&a[i][j]); ^
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ă.