#1266
CautaNrInMatrice
Într-o matrice în care elementele sunt aranjate crescător pe anumite linii şi descrescător pe altele, trebuie găsită linia şi coloana pe care se află un anumit element.
Problema | CautaNrInMatrice | Operații I/O |
cautanrinmatrice.in /cautanrinmatrice.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 2 MB
|
Id soluție | #52913105 | Utilizator | |
Fișier | cautanrinmatrice.cpp | Dimensiune | 1.23 KB |
Data încărcării | 12 Octombrie 2024, 17:29 | Scor / rezultat | Eroare de compilare |
cautanrinmatrice.cpp: In function 'int main()': cautanrinmatrice.cpp:25:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ cautanrinmatrice.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("cautanrinmatrice.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cautanrinmatrice.cpp:33:17: error: reference to 'cin' is ambiguous cin >> e[p+aux]; ^ cautanrinmatrice.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("cautanrinmatrice.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cautanrinmatrice.cpp:41:17: error: reference to 'cin' is ambiguous cin >> e[p] , p++; ^ cautanrinmatrice.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("cautanrinmatrice.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cautanrinmatrice.cpp:44:5: error: reference to 'cin' is ambiguous cin >> q; ^ cautanrinmatrice.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("cautanrinmatrice.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cautanrinmatrice.cpp:47:9: error: reference to 'cin' is ambiguous cin >> x; ^ cautanrinmatrice.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("cautanrinmatrice.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cautanrinmatrice.cpp:55:13: error: reference to 'cout' is ambiguous cout << a << ' ' << b << '\n'; ^ cautanrinmatrice.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("cautanrinmatrice.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ cautanrinmatrice.cpp:57:13: error: reference to 'cout' is ambiguous else cout << 0 << '\n'; ^ cautanrinmatrice.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("cautanrinmatrice.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cautanrinmatrice.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 CautaNrInMatrice 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ă.