#1972
Hambar
Să se determine dreptunghiul de arie maximă ce conține numai 0
.
Problema | Hambar | Operații I/O |
hambar.in /hambar.out
|
---|---|---|---|
Limita timp | 3 secunde | Limita memorie |
Total: 5 MB
/
Stivă 1 MB
|
Id soluție | #51485675 | Utilizator | |
Fișier | hambar.cpp | Dimensiune | 1.84 KB |
Data încărcării | 26 Iunie 2024, 10:12 | Scor / rezultat | Eroare de compilare |
hambar.cpp:1:51: error: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first int teren(int is, int js, int id, int jd, int a[][]) { ^ hambar.cpp: In function 'int teren(...)': hambar.cpp:3:9: error: 'is' was not declared in this scope if (is == id && js == jd) { ^ hambar.cpp:3:15: error: 'id' was not declared in this scope if (is == id && js == jd) { ^ hambar.cpp:3:21: error: 'js' was not declared in this scope if (is == id && js == jd) { ^ hambar.cpp:3:27: error: 'jd' was not declared in this scope if (is == id && js == jd) { ^ hambar.cpp:4:13: error: 'a' was not declared in this scope if (a[is][js] == 1) { ^ hambar.cpp:10:9: error: 'is' was not declared in this scope if (is < id && js < jd) { ^ hambar.cpp:10:14: error: 'id' was not declared in this scope if (is < id && js < jd) { ^ hambar.cpp:10:20: error: 'js' was not declared in this scope if (is < id && js < jd) { ^ hambar.cpp:10:25: error: 'jd' was not declared in this scope if (is < id && js < jd) { ^ hambar.cpp:11:13: error: 'a' was not declared in this scope if (a[is][js] > a[id][jd]) return is * 10 + js; ^ hambar.cpp:16:17: error: 'is' was not declared in this scope int imij = (is + id) / 2; ^ hambar.cpp:16:22: error: 'id' was not declared in this scope int imij = (is + id) / 2; ^ hambar.cpp:17:17: error: 'js' was not declared in this scope int jmij = (js + jd) / 2; ^ hambar.cpp:17:22: error: 'jd' was not declared in this scope int jmij = (js + jd) / 2; ^ hambar.cpp:18:43: error: 'a' was not declared in this scope int stsus = teren(is, js, imij, jmij, a[][]); ^ hambar.cpp:18:45: error: expected primary-expression before ']' token int stsus = teren(is, js, imij, jmij, a[][]); ^ hambar.cpp:18:47: error: expected primary-expression before ']' token int stsus = teren(is, js, imij, jmij, a[][]); ^ hambar.cpp:19:49: error: expected primary-expression before ']' token int drsus = teren(is, jmij + 1, imij, jd, a[][]); ^ hambar.cpp:19:51: error: expected primary-expression before ']' token int drsus = teren(is, jmij + 1, imij, jd, a[][]); ^ hambar.cpp:20:49: error: expected primary-expression before ']' token int stjos = teren(imij + 1, js, id, jmij, a[][]); ^ hambar.cpp:20:51: error: expected primary-expression before ']' token int stjos = teren(imij + 1, js, id, jmij, a[][]); ^ hambar.cpp:21:53: error: expected primary-expression before ']' token int drjos = teren(imij + 1, jmij + 1, id, jd, a[][]); ^ hambar.cpp:21:55: error: expected primary-expression before ']' token int drjos = teren(imij + 1, jmij + 1, id, jd, a[][]); ^ hambar.cpp:25:13: warning: unused variable 'st1' [-Wunused-variable] int st1 = stsus / 10 * 10 + stsus % 10; ^ hambar.cpp:31:13: warning: unused variable 'dr1' [-Wunused-variable] int dr1 = drsus / 10 * 10 + drsus % 10; ^ hambar.cpp:36:13: warning: unused variable 'st2' [-Wunused-variable] int st2 = stjos / 10 * 10 + stjos % 10; ^ hambar.cpp:41:13: warning: unused variable 'dr2' [-Wunused-variable] int dr2 = drjos / 10 * 10 + drjos % 10; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Hambar 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ă.