#767
SumaPare2
Se dă o matrice cu n
linii şi m
coloane şi elemente numere naturale. Determinați suma valorilor pare din matrice.
Problema | SumaPare2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #45432124 | Utilizator | |
Fișier | sumapare2.cpp | Dimensiune | 835 B |
Data încărcării | 12 Octombrie 2023, 12:36 | Scor / rezultat | Eroare de compilare |
sumapare2.cpp: In function 'int main()': sumapare2.cpp:26:5: error: reference to 'cin' is ambiguous cin >> n; ^ sumapare2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("countprimsub.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sumapare2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ sumapare2.cpp:29:9: error: reference to 'cin' is ambiguous cin >> val[i] >> St[i] >> Dr[i]; ^ sumapare2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("countprimsub.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sumapare2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ sumapare2.cpp:33:5: error: reference to 'cin' is ambiguous cin >> k; ^ sumapare2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("countprimsub.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sumapare2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ sumapare2.cpp:36:9: error: reference to 'cin' is ambiguous cin >> x; ^ sumapare2.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("countprimsub.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sumapare2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ sumapare2.cpp:39:9: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ sumapare2.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("countprimsub.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sumapare2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumaPare2 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ă.