#3264
SumMin_XI
Se dă o matrice pătratică cu n
lini şi n
coloane şi elemente numere întregi. Determinaţi cea mai mică sumă a n
elemente din matrice, obținută adunând câte un element de pe fiecare coloană a matricei.
Problema | SumMin_XI | Operații I/O |
summin_xi.in /summin_xi.out
|
---|---|---|---|
Limita timp | 0.75 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #27241769 | Utilizator | |
Fișier | summin_xi.cpp | Dimensiune | 478 B |
Data încărcării | 15 Ianuarie 2021, 00:02 | Scor / rezultat | Eroare de compilare |
summin_xi.cpp:3:14: warning: missing terminating " character [enabled by default] ifstream cin("summin_xi.in" ^ summin_xi.cpp:3:1: error: missing terminating " character ifstream cin("summin_xi.in" ^ summin_xi.cpp:4:15: warning: missing terminating " character [enabled by default] ofstream cout("summin_xi.out" ^ summin_xi.cpp:4:1: error: missing terminating " character ofstream cout("summin_xi.out" ^ summin_xi.cpp:5:9: error: 'a' has not been declared int n , a[101][101] , sum; ^ summin_xi.cpp:5:23: error: 'sum' has not been declared int n , a[101][101] , sum; ^ summin_xi.cpp:5:26: error: expected ')' before ';' token int n , a[101][101] , sum; ^ summin_xi.cpp:5:26: error: expected ')' before ';' token summin_xi.cpp: In function 'int main()': summin_xi.cpp:8:5: error: reference to 'cin' is ambiguous cin >> n; ^ summin_xi.cpp:3:10: note: candidates are: std::ifstream cin(std::ofstream (*)(int, int (*)[101], int)) ifstream cin("summin_xi.in" ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from summin_xi.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ summin_xi.cpp:8:12: error: 'n' was not declared in this scope cin >> n; ^ summin_xi.cpp:11:13: error: reference to 'cin' is ambiguous cin >> a[j]; ^ summin_xi.cpp:3:10: note: candidates are: std::ifstream cin(std::ofstream (*)(int, int (*)[101], int)) ifstream cin("summin_xi.in" ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from summin_xi.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ summin_xi.cpp:11:20: error: 'a' was not declared in this scope cin >> a[j]; ^ summin_xi.cpp:16:16: error: 'a' was not declared in this scope if(a[j] < mini) mini = a[j]; ^ summin_xi.cpp:17:9: error: 'sum' was not declared in this scope sum += mini; ^ summin_xi.cpp:19:13: error: 'sum' was not declared in this scope cout << sum; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumMin_XI 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ă.