#210
Chenar
Să se parcurgă în sensul acelor de ceasornic chenarul exterior al unei matrice pătratice.
Variante Bacalaureat 2009
Problema | Chenar | Operații I/O |
chenar.in /chenar.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54054434 | Utilizator | |
Fișier | chenar.cpp | Dimensiune | 790 B |
Data încărcării | 18 Noiembrie 2024, 19:55 | Scor / rezultat | Eroare de compilare |
chenar.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("chenar.in"); ^ chenar.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("chenar.out"); ^ chenar.cpp: In function 'int main()': chenar.cpp:12:5: error: reference to 'cin' is ambiguous cin>>n>>m; ^ chenar.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("chenar.in"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ chenar.cpp:15:13: error: reference to 'cin' is ambiguous cin>>a[i][j]; ^ chenar.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("chenar.in"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ chenar.cpp:20:9: error: reference to 'cout' is ambiguous cout<<a[0][j]<<" "; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ chenar.cpp:24:9: error: reference to 'cout' is ambiguous cout<<a[n-1][j]<<" "; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ chenar.cpp:28:9: error: reference to 'cout' is ambiguous cout<<a[i][0]<<" "; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ chenar.cpp:32:9: error: reference to 'cout' is ambiguous cout<<a[i][m-1]<<" "; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ chenar.cpp:36:13: error: reference to 'cout' is ambiguous cout<<a[i][j]<<" "; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ chenar.cpp:38:9: error: reference to 'cout' is ambiguous cout<<'\n'; ^ chenar.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("chenar.out"); ^ In file included from chenar.cpp:1:0: /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 Chenar 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ă.