#669
Se dă o matrice cu n linii și m coloane și elemente numere naturale. Se cere să se determine suma elementelor de pe anumite linii și coloane, precizate.
| Problema | LinCol | Operații I/O |
lincol.in/lincol.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64761632 | Utilizator | |
| Fișier | lincol.cpp | Dimensiune | 631 B |
| Data încărcării | 28 Mai 2026, 12:45 | Scor/rezultat | Eroare de compilare |
lincol.cpp:4:10: error: expected unqualified-id before string constant 4 | ifstream("lincol.in"); | ^~~~~~~~~~~ lincol.cpp:4:10: error: expected ‘)’ before string constant 4 | ifstream("lincol.in"); | ~^~~~~~~~~~~ | ) lincol.cpp:5:10: error: expected unqualified-id before string constant 5 | ofstream("lincol.out"); | ^~~~~~~~~~~~ lincol.cpp:5:10: error: expected ‘)’ before string constant 5 | ofstream("lincol.out"); | ~^~~~~~~~~~~~ | ) lincol.cpp: In function ‘int main()’: lincol.cpp:11:5: error: ‘fin’ was not declared in this scope; did you mean ‘sin’? 11 | fin>>n>>m; | ^~~ | sin lincol.cpp:12:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(i=1;i<=n;i++) | ^~~ lincol.cpp:15:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | fin>>k; | ^~~ lincol.cpp:21:13: error: ‘s’ was not declared in this scope 21 | s=0; | ^ lincol.cpp:22:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 22 | for(j=1;j<=n;j++) | ^~~ lincol.cpp:24:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | fout<<s<<"\n"; | ^~~~ lincol.cpp:24:14: error: ‘fout’ was not declared in this scope lincol.cpp:29:17: error: ‘s’ was not declared in this scope 29 | s+=a[x][j]; | ^ lincol.cpp:30:12: error: ‘fout’ was not declared in this scope 30 | fout<<s<<"\n"; | ^~~~ lincol.cpp:30:18: error: ‘s’ was not declared in this scope 30 | fout<<s<<"\n"; | ^ lincol.cpp:9:15: warning: unused variable ‘y’ [-Wunused-variable] 9 | int i,j,k,y,x; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LinCol 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ă.