#192
Să se afișeze elementele de pe coloana cu suma elementelor maximă într-o matrice.
Problema | SumColMax | Operații I/O |
![]() sumcolmax.in /sumcolmax.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54464387 | Utilizator | |
Fișier | sumcolmax.cpp | Dimensiune | 897 B |
Data încărcării | 29 Noiembrie 2024, 09:34 | Scor / rezultat | Eroare de compilare |
sumcolmax.cpp:3:15: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin( sumcolmax.in) ^ sumcolmax.cpp:3:15: error: 'sumcolmax' was not declared in this scope sumcolmax.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout(sumcolmax.out ) ^ sumcolmax.cpp:12:23: error: 'maxim' has not been declared int maxim(int n,int m,maxim,a[101][101]) ^ sumcolmax.cpp:12:29: error: 'a' has not been declared int maxim(int n,int m,maxim,a[101][101]) ^ sumcolmax.cpp: In function 'int maxim(int, int, int, int (*)[101])': sumcolmax.cpp:19:22: error: 'a' was not declared in this scope if(maxim>a[i][j]) ^ sumcolmax.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ sumcolmax.cpp: In function 'int sum(int, int, int (*)[1001])': sumcolmax.cpp:25:19: error: 'i' was not declared in this scope int sum=maxim[i][j]; ^ sumcolmax.cpp:25:22: error: 'j' was not declared in this scope int sum=maxim[i][j]; ^ sumcolmax.cpp:31:32: warning: pointer to a function used in arithmetic [-Wpointer-arith] sum=sum+maxim[i][j]; ^ sumcolmax.cpp:31:35: warning: pointer to a function used in arithmetic [-Wpointer-arith] sum=sum+maxim[i][j]; ^ sumcolmax.cpp:31:35: warning: pointer to a function used in arithmetic [-Wpointer-arith] sumcolmax.cpp:31:24: error: invalid conversion from 'int (*)(int, int, int, int (*)[101])' to 'int' [-fpermissive] sum=sum+maxim[i][j]; ^ sumcolmax.cpp:38:1: error: expected primary-expression before '}' token } ^ sumcolmax.cpp:38:1: error: expected ';' before '}' token sumcolmax.cpp:38:1: warning: no return statement in function returning non-void [-Wreturn-type] sumcolmax.cpp: At global scope: sumcolmax.cpp:39:5: warning: second argument of 'int main(int, int)' should be 'char **' [-Wmain] int main(int n,int m) ^ sumcolmax.cpp: In function 'int main(int, int)': sumcolmax.cpp:42:15: error: 'i' was not declared in this scope cout<<sum(i,j); ^ sumcolmax.cpp:42:17: error: 'j' was not declared in this scope cout<<sum(i,j); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumColMax 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ă.