#1444
Să se afle indicele coloanei dintr-o matrice pentru care suma elementelor este minimă.
folclor
| Problema | Memory001 | Operații I/O |
memory001.in/memory001.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
| Id soluție | #64808178 | Utilizator | |
| Fișier | memory001.cpp | Dimensiune | 639 B |
| Data încărcării | 02 Iunie 2026, 17:30 | Scor/rezultat | Eroare de compilare |
memory001.cpp: In function ‘int main()’: memory001.cpp:10:9: error: expected initializer before ‘int’ 10 | int m,n,i,j,s,poz,min=INT_MAX; | ^~~ memory001.cpp:11:10: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 11 | fin>>m>>n; | ^ | tm memory001.cpp:11:13: error: ‘n’ was not declared in this scope 11 | fin>>m>>n; | ^ memory001.cpp:12:9: error: ‘i’ was not declared in this scope 12 | for(i=1; i<=m; i++) | ^ memory001.cpp:13:13: error: ‘j’ was not declared in this scope 13 | for(j=1; j<=n; j++) | ^ memory001.cpp:14:14: error: ‘a’ was not declared in this scope 14 | fin>>a[i][j]; | ^ memory001.cpp:15:9: error: ‘j’ was not declared in this scope 15 | for(j=1; j<=n; j++) | ^ memory001.cpp:17:9: error: ‘s’ was not declared in this scope 17 | s=0; | ^ memory001.cpp:18:13: error: ‘i’ was not declared in this scope 18 | for(i=1; i<=m; i++) | ^ memory001.cpp:20:17: error: ‘a’ was not declared in this scope 20 | s=s+a[i][j]; | ^ memory001.cpp:22:9: error: ‘a’ was not declared in this scope 22 | a[0][j]=s; | ^ memory001.cpp:24:9: error: ‘j’ was not declared in this scope 24 | for(j=1; j<=n; j++) | ^ memory001.cpp:26:12: error: ‘a’ was not declared in this scope 26 | if(a[0][j]<min) | ^ memory001.cpp:29:13: error: ‘poz’ was not declared in this scope 29 | poz=j; | ^~~ memory001.cpp:32:11: error: ‘poz’ was not declared in this scope 32 | fout<<poz; | ^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory001 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ă.