#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 | #54010920 | Utilizator | |
Fișier | chenar.cpp | Dimensiune | 535 B |
Data încărcării | 17 Noiembrie 2024, 19:57 | 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:11:9: error: reference to 'cin' is ambiguous 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:16:6: 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:20:8: 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:24: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:28: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 ^
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ă.