#1192
Arhitectura2
Pentru un sir de n
numere naturale reprezentand inaltimile unor cladiri , sa se raspunda la o intrebare pentru fiecare element .
Problema | Arhitectura2 | Operații I/O |
arhitectura2.in /arhitectura2.out
|
---|---|---|---|
Limita timp | 1.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53422195 | Utilizator | |
Fișier | arhitectura2.cpp | Dimensiune | 567 B |
Data încărcării | 29 Octombrie 2024, 17:37 | Scor / rezultat | Eroare de compilare |
arhitectura2.cpp:5:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("arhitectura2.in"); ^ arhitectura2.cpp:6:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("arhitectura2.out"); ^ arhitectura2.cpp: In function 'int main()': arhitectura2.cpp:14:5: error: reference to 'cin' is ambiguous cin>>n; ^ arhitectura2.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("arhitectura2.in"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ arhitectura2.cpp:15:27: error: reference to 'cin' is ambiguous for(int i=1;i<=n;i++) cin>>a[i]; ^ arhitectura2.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("arhitectura2.in"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ arhitectura2.cpp:18:5: error: reference to 'cout' is ambiguous cout<<a[i]<<" "; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ arhitectura2.cpp:19:5: error: reference to 'cout' is ambiguous cout<<"\n"; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ arhitectura2.cpp:20:5: error: reference to 'cout' is ambiguous cout<<0<<" "; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ arhitectura2.cpp:24:9: error: reference to 'cout' is ambiguous cout<<1<<" "; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ arhitectura2.cpp:26:9: error: reference to 'cout' is ambiguous cout<<0<<" "; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ arhitectura2.cpp:28:5: error: reference to 'cout' is ambiguous cout<<0; ^ arhitectura2.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("arhitectura2.out"); ^ In file included from arhitectura2.cpp:2: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 Arhitectura2 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ă.