#784
LinColEgale
Se dă o matrice cu n
linii şi n
coloane şi elemente numere naturale. Să se determine câte elemente ale matricei se află pe linii și coloane de sumă egală.
Problema | LinColEgale | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53157888 | Utilizator | |
Fișier | lincolegale.cpp | Dimensiune | 332 B |
Data încărcării | 19 Octombrie 2024, 13:49 | Scor / rezultat | Eroare de compilare |
lincolegale.cpp: In function 'int main()': lincolegale.cpp:6:10: error: 'n' was not declared in this scope cin>>n; ^ lincolegale.cpp:7:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ lincolegale.cpp:8:13: error: 'j' was not declared in this scope for(j=1; j<=n; j++) ^ lincolegale.cpp:9:14: error: 'a' was not declared in this scope cin>>a[i][j]; ^ lincolegale.cpp:10:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ lincolegale.cpp:11:9: error: 'suml' was not declared in this scope suml+=a[i][j]; ^ lincolegale.cpp:11:15: error: 'a' was not declared in this scope suml+=a[i][j]; ^ lincolegale.cpp:11:20: error: 'j' was not declared in this scope suml+=a[i][j]; ^ lincolegale.cpp:12:10: error: 'j' was not declared in this scope for(j=1; j<=n; j++) ^ lincolegale.cpp:13:9: error: 'sumc' was not declared in this scope sumc+=a[j][i]; ^ lincolegale.cpp:13:15: error: 'a' was not declared in this scope sumc+=a[j][i]; ^ lincolegale.cpp:13:20: error: 'i' was not declared in this scope sumc+=a[j][i]; ^ lincolegale.cpp:14:9: error: 's' was not declared in this scope s=0; ^ lincolegale.cpp:15:11: error: 'sumc' was not declared in this scope if(sumc==suml) ^ lincolegale.cpp:15:17: error: 'suml' was not declared in this scope if(sumc==suml) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LinColEgale 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ă.