#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 | #54683754 | Utilizator | |
Fișier | chenar.cpp | Dimensiune | 581 B |
Data încărcării | 05 Decembrie 2024, 12:20 | Scor / rezultat | Eroare de compilare |
chenar.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("chenar.in"); ^ chenar.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("chenar.out"); ^ chenar.cpp: In function 'int main()': chenar.cpp:8:5: error: reference to 'cin' is ambiguous cin >> n; ^ chenar.cpp:3: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:10:39: error: reference to 'cin' is ambiguous for(int j = 1 ; j <= n ; j++) cin >> a[i][j]; ^ chenar.cpp:3: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:13:9: error: reference to 'cout' is ambiguous cout << a[1][j] << " "; ^ chenar.cpp:4: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:17:9: error: reference to 'cout' is ambiguous cout << a[i][n] << " "; ^ chenar.cpp:4: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:21:9: error: reference to 'cout' is ambiguous cout << a[n][j] << " "; ^ chenar.cpp:4: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:25:9: error: reference to 'cout' is ambiguous cout << a[i][1] << " "; ^ chenar.cpp:4: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:7:13: warning: unused variable 'm' [-Wunused-variable] int n , m , a[50][50]; ^
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ă.