#236
Sort2
Fişierul text sort2.in
conţine, dispuse pe mai multe linii, cel mult 100
de numere naturale, cu cel mult 4
cifre fiecare. Să se afişeze în fişierul sort2.out
, în ordine crescătoare, toate numerele din fişierul sort2.in
care au cel mult 2
cifre.
Variante Bacalaureat 2009
Problema | Sort2 | Operații I/O |
sort2.in /sort2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #14646541 | Utilizator | |
Fișier | sort2.cpp | Dimensiune | 696 B |
Data încărcării | 12 Martie 2019, 08:34 | Scor / rezultat | Eroare de compilare |
sort2.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include <bits/stdc++.h> ^ sort2.cpp:3:1: error: stray '\302' in program using namespace std; ^ sort2.cpp:3:1: error: stray '\240' in program sort2.cpp:3:1: error: stray '\302' in program sort2.cpp:3:1: error: stray '\240' in program sort2.cpp:5:1: error: stray '\302' in program ifstream fin("sort2.in"); ^ sort2.cpp:5:1: error: stray '\240' in program sort2.cpp:6:1: error: stray '\302' in program ofstream fout("sort2.out"); ^ sort2.cpp:6:1: error: stray '\240' in program sort2.cpp:8:1: error: stray '\302' in program int x,nr,a[101]; ^ sort2.cpp:8:1: error: stray '\240' in program sort2.cpp:10:1: error: stray '\302' in program int nrcifre(int a); ^ sort2.cpp:10:1: error: stray '\240' in program sort2.cpp:10:1: error: stray '\302' in program sort2.cpp:10:1: error: stray '\240' in program sort2.cpp:12:1: error: stray '\302' in program int main() ^ sort2.cpp:12:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program while(fin >> x) ^ sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:15:1: error: stray '\302' in program sort2.cpp:15:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program if(nrcifre(x)<=2) ^ sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:16:1: error: stray '\302' in program sort2.cpp:16:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program a[nr++]=x; ^ sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:17:1: error: stray '\302' in program sort2.cpp:17:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program if(nr==0) fout << "NU EXISTA"; ^ sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:19:1: error: stray '\302' in program sort2.cpp:19:1: error: stray '\240' in program sort2.cpp:20:1: error: stray '\302' in program else ^ sort2.cpp:20:1: error: stray '\240' in program sort2.cpp:20:1: error: stray '\302' in program sort2.cpp:20:1: error: stray '\240' in program sort2.cpp:20:1: error: stray '\302' in program sort2.cpp:20:1: error: stray '\240' in program sort2.cpp:20:1: error: stray '\302' in program sort2.cpp:20:1: error: stray '\240' in program sort2.cpp:21:1: error: stray '\302' in program { ^ sort2.cpp:21:1: error: stray '\240' in program sort2.cpp:21:1: error: stray '\302' in program sort2.cpp:21:1: error: stray '\240' in program sort2.cpp:21:1: error: stray '\302' in program sort2.cpp:21:1: error: stray '\240' in program sort2.cpp:21:1: error: stray '\302' in program sort2.cpp:21:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort(a,a+nr); ^ sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:22:1: error: stray '\302' in program sort2.cpp:22:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program for(int i=0;i<nr;i++) ^ sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:23:1: error: stray '\302' in program sort2.cpp:23:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program fout << a[i] << " "; ^ sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:24:1: error: stray '\302' in program sort2.cpp:24:1: error: stray '\240' in program sort2.cpp:25:1: error: stray '\302' in program } ^ sort2.cpp:25:1: error: stray '\240' in program sort2.cpp:25:1: error: stray '\302' in program sort2.cpp:25:1: error: stray '\240' in program sort2.cpp:25:1: error: stray '\302' in program sort2.cpp:25:1: error: stray '\240' in program sort2.cpp:25:1: error: stray '\302' in program sort2.cpp:25:1: error: stray '\240' in program sort2.cpp:27:1: error: stray '\302' in program return 0; ^ sort2.cpp:27:1: error: stray '\240' in program sort2.cpp:27:1: error: stray '\302' in program sort2.cpp:27:1: error: stray '\240' in program sort2.cpp:27:1: error: stray '\302' in program sort2.cpp:27:1: error: stray '\240' in program sort2.cpp:27:1: error: stray '\302' in program sort2.cpp:27:1: error: stray '\240' in program sort2.cpp:27:1: error: stray '\302' in program sort2.cpp:27:1: error: stray '\240' in program sort2.cpp:31:1: error: stray '\302' in program int nrcifre(int a) ^ sort2.cpp:31:1: error: stray '\240' in program sort2.cpp:31:1: error: stray '\302' in program sort2.cpp:31:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program if(a<10) return 1; ^ sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:33:1: error: stray '\302' in program sort2.cpp:33:1: error: stray '\240' in program sort2.cpp:34:1: error: stray '\302' in program int k=0; ^ sort2.cpp:34:1: error: stray '\240' in program sort2.cpp:34:1: error: stray '\302' in program sort2.cpp:34:1: error: stray '\240' in program sort2.cpp:34:1: error: stray '\302' in program sort2.cpp:34:1: error: stray '\240' in program sort2.cpp:34:1: error: stray '\302' in program sort2.cpp:34:1: error: stray '\240' in program sort2.cpp:34:1: error: stray '\302' in program sort2.cpp:34:1: error: stray '\240' in program sort2.cpp:35:1: error: stray '\302' in program while(a!=0) ^ sort2.cpp:35:1: error: stray '\240' in program sort2.cpp:35:1: error: stray '\302' in program sort2.cpp:35:1: error: stray '\240' in program sort2.cpp:35:1: error: stray '\302' in program sort2.cpp:35:1: error: stray '\240' in program sort2.cpp:35:1: error: stray '\302' in program sort2.cpp:35:1: error: stray '\240' in program sort2.cpp:36:1: error: stray '\302' in program { ^ sort2.cpp:36:1: error: stray '\240' in program sort2.cpp:36:1: error: stray '\302' in program sort2.cpp:36:1: error: stray '\240' in program sort2.cpp:36:1: error: stray '\302' in program sort2.cpp:36:1: error: stray '\240' in program sort2.cpp:36:1: error: stray '\302' in program sort2.cpp:36:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program k++; ^ sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:37:1: error: stray '\302' in program sort2.cpp:37:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program a/=10; ^ sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:38:1: error: stray '\302' in program sort2.cpp:38:1: error: stray '\240' in program sort2.cpp:39:1: error: stray '\302' in program } ^ sort2.cpp:39:1: error: stray '\240' in program sort2.cpp:39:1: error: stray '\302' in program sort2.cpp:39:1: error: stray '\240' in program sort2.cpp:39:1: error: stray '\302' in program sort2.cpp:39:1: error: stray '\240' in program sort2.cpp:39:1: error: stray '\302' in program sort2.cpp:39:1: error: stray '\240' in program sort2.cpp:40:1: error: stray '\302' in program return k; ^ sort2.cpp:40:1: error: stray '\240' in program sort2.cpp:40:1: error: stray '\302' in program sort2.cpp:40:1: error: stray '\240' in program sort2.cpp:40:1: error: stray '\302' in program sort2.cpp:40:1: error: stray '\240' in program sort2.cpp:40:1: error: stray '\302' in program sort2.cpp:40:1: error: stray '\240' in program sort2.cpp:40:1: error: stray '\302' in program sort2.cpp:40:1: error: stray '\240' in program sort2.cpp:5:1: error: 'ifstream' does not name a type ifstream fin("sort2.in"); ^ sort2.cpp:6:1: error: 'ofstream' does not name a type ofstream fout("sort2.out"); ^ sort2.cpp: In function 'int main()': sort2.cpp:15:15: error: 'fin' was not declared in this scope while(fin >> x) ^ sort2.cpp:19:20: error: 'fout' was not declared in this scope if(nr==0) fout << "NU EXISTA"; ^ sort2.cpp:22:28: error: 'sort' was not declared in this scope sort(a,a+nr); ^ sort2.cpp:24:25: error: 'fout' was not declared in this scope fout << a[i] << " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sort2 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ă.