#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 | #53948637 | Utilizator | |
Fișier | chenar.cpp | Dimensiune | 501 B |
Data încărcării | 15 Noiembrie 2024, 15:30 | 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:10:5: error: reference to 'cin' is ambiguous cin>>n; ^ 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:14: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:18:8: error: reference to 'cout' is ambiguous cout<<a[1][i]<<" "; ^ 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:20:9: error: reference to 'cout' is ambiguous cout<<a[j][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 ^ chenar.cpp:22:9: error: reference to 'cout' is ambiguous cout<<a[n][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:5: error: reference to 'cout' is ambiguous cout<<a[i][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 ^
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ă.