#231
Exista
Scrieţi un program care citeşte un tablou bidimensional cu m
linii şi n
coloane şi un număr k
şi determină suma indicilor coloanelor care conţin valoarea k
.
Variante Bacalaureat 2009
Problema | Exista | Operații I/O |
exista.in /exista.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55032820 | Utilizator | |
Fișier | exista.cpp | Dimensiune | 595 B |
Data încărcării | 17 Decembrie 2024, 15:19 | Scor / rezultat | Eroare de compilare |
exista.cpp: In function 'int main()': exista.cpp:8:5: error: expected ',' or ';' before 'unsigned' unsigned a[11][11],m,n,i,j,k; ^ exista.cpp:9:10: error: 'k' was not declared in this scope fin>>k; ^ exista.cpp:10:10: error: 'm' was not declared in this scope fin>>m; ^ exista.cpp:11:10: error: 'n' was not declared in this scope fin>>n; ^ exista.cpp:12:5: error: 'ok' was not declared in this scope ok=1; ^ exista.cpp:13:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ exista.cpp:15:13: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ exista.cpp:17:18: error: 'a' was not declared in this scope fin>>a[i][j]; ^ exista.cpp:20:9: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ exista.cpp:22:13: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ exista.cpp:24:16: error: 'a' was not declared in this scope if(a[i][j]==k) ^ exista.cpp:27:16: error: 's' was not declared in this scope s=s+j; ^ exista.cpp:31:11: error: 's' was not declared in this scope fout<<s; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Exista 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ă.