#244
CifreOrd
Se dau n
cifre zecimale. Să se afişeze aceste cifre în ordine crescătoare.
Problema | CifreOrd | Operații I/O |
cifreord.in /cifreord.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55109396 | Utilizator | |
Fișier | cifreord.cpp | Dimensiune | 733 B |
Data încărcării | 24 Decembrie 2024, 20:46 | Scor / rezultat | Eroare de compilare |
cifreord.cpp:5:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("cifreord.in"); ^ cifreord.cpp:6:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("cifreord.out"); ^ cifreord.cpp: In function 'int main()': cifreord.cpp:25:11: error: reference to 'cin' is ambiguous while(cin>>n) ^ cifreord.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("cifreord.in"); ^ In file included from cifreord.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ cifreord.cpp:35:17: error: reference to 'cout' is ambiguous cout<<i<<" "; ^ cifreord.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("cifreord.out"); ^ In file included from cifreord.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ cifreord.cpp:37:28: error: reference to 'cout' is ambiguous if(ct==20) cout<<endl; ^ cifreord.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("cifreord.out"); ^ In file included from cifreord.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ cifreord.cpp:24:11: warning: unused variable 'm' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:18: warning: unused variable 'lmax' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:25: warning: unused variable 'smax' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:32: warning: unused variable 'dr' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:37: warning: unused variable 'st' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:42: warning: unused variable 'i' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:44: warning: unused variable 'j' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^ cifreord.cpp:24:46: warning: unused variable 'v' [-Wunused-variable] int n,m,ct=0,lmax=0,smax=0,dr=0,st=0,i,j,v[10001]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreOrd 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ă.