#1267
plaja
Fiind data o matrice de 0
si 1
, sa se gaseasca cel mai mare dreptunghi care contine doar 0
.
Problema | plaja | Operații I/O |
plaja.in /plaja.out
|
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 16 MB
/
Stivă 4 MB
|
Id soluție | #53404494 | Utilizator | |
Fișier | plaja.cpp | Dimensiune | 1.06 KB |
Data încărcării | 28 Octombrie 2024, 17:45 | Scor / rezultat | Eroare de compilare |
plaja.cpp:43:4: error: stray '\302' in program cout << valmax; ^ plaja.cpp:43:4: error: stray '\240' in program plaja.cpp:43:4: error: stray '\302' in program plaja.cpp:43:4: error: stray '\240' in program plaja.cpp:43:4: error: stray '\302' in program plaja.cpp:43:4: error: stray '\240' in program plaja.cpp: In function 'void sol()': plaja.cpp:11:16: error: conflicting declaration 'int st [1005]' int st[1005], dr[1005]; ^ plaja.cpp:10:17: error: 'st' has a previous declaration as 'std::stack<int> st' stack <int> st; ^ plaja.cpp:13:40: error: 'stiva' was not declared in this scope while(!st.empty() && v[i] <= v[stiva.top()]) ^ plaja.cpp:15:12: error: 'stiva' was not declared in this scope if(stiva.empty()) ^ plaja.cpp:16:15: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int') st[i] = 1; ^ plaja.cpp:17:16: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int') else st[i] = stiva.top() + 1; ^ plaja.cpp:18:9: error: 'stiva' was not declared in this scope stiva.push(i); ^ plaja.cpp:20:12: error: 'stiva' was not declared in this scope while(!stiva.empty()) ^ plaja.cpp:23:16: error: 'stiva' was not declared in this scope while(!stiva.empty() && v[i] <= v[stiva.top()]) ^ plaja.cpp:25:12: error: 'stiva' was not declared in this scope if(stiva.empty()) ^ plaja.cpp:28:41: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int') valmax = max(valmax, (dr[i] - st[i] + 1) * v[i]); ^ plaja.cpp:29:9: error: 'stiva' was not declared in this scope stiva.push(i); ^ plaja.cpp: In function 'int main()': plaja.cpp:36:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0; j < s.size(); j++){ ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema plaja 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ă.