#1191
Se citesc n numere naturale reprezentând înălțimile a n clădiri. Cerința problemei este de a realiza un proiect de arhitectură în care clădirile sunt ordonate descrescător după înălțimea lor.
| Problema | Arhitectura | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63346992 | Utilizator | |
| Fișier | arhitectura.cpp | Dimensiune | 252 B |
| Data încărcării | 27 Februarie 2026, 09:22 | Scor/rezultat | Eroare de compilare |
arhitectura.cpp:2:1: error: 'usig' does not name a type usig namespace std; ^ arhitectura.cpp: In function 'int main()': arhitectura.cpp:6:5: error: 'cin' was not declared in this scope cin>>n; ^ arhitectura.cpp:6:5: note: suggested alternative: In file included from arhitectura.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ arhitectura.cpp:8:21: error: expected primary-expression before ';' token for(int j=i+;j<n;j++) ^ arhitectura.cpp:10:18: error: expected ')' before ';' token swap(v[i];v[j]); ^ arhitectura.cpp:10:21: error: 'j' was not declared in this scope swap(v[i];v[j]); ^ arhitectura.cpp:10:23: error: expected ';' before ')' token swap(v[i];v[j]); ^ arhitectura.cpp:11:9: error: 'cout' was not declared in this scope cout<<v[i]; ^ arhitectura.cpp:11:9: note: suggested alternative: In file included from arhitectura.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ arhitectura.cpp:11:17: error: 'i' was not declared in this scope cout<<v[i]; ^ arhitectura.cpp:12:17: error: expected '}' at end of input return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Arhitectura 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ă.