Detalii evaluare #12781218

Rezumat problemă

Se dă un vector cu n elemente numere întregi, n fiind număr par. Să se ordoneze crescător elementele din prima jumătate a vectorului și descrescător elementele din a doua jumătate.

Se vor defini și apela următoarele subprograme:

  • citire, care citește valoarea lui n și cele n elemente ale tabloului
  • afisare, care afișează elementele tabloului, separate prin exact un spațiu
  • sortare, care ordonează elementele vectorului cuprinse între doi indici transmiși ca parametru. Criteriul de ordonare (crescător/descrescător) va fi transmis ca parametru.

În programele C/C++ nu se vor folosi variabile globale.

Detalii

Problema HalfSort1 Operații I/O halfsort1.in/halfsort1.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #12781218 Utilizator iani vladimir (vladi)
Fișier halfsort1.cpp Dimensiune 1006 B
Data încărcării 13 Decembrie 2018, 00:34 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

halfsort1.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <fstream>

         ^
halfsort1.cpp:3:1: error: stray '\302' in program
 using namespace std;

 ^
halfsort1.cpp:3:1: error: stray '\240' in program
halfsort1.cpp:3:1: error: stray '\302' in program
halfsort1.cpp:3:1: error: stray '\240' in program
halfsort1.cpp:5:1: error: stray '\302' in program
 ifstream fin("halfsort1.in");

 ^
halfsort1.cpp:5:1: error: stray '\240' in program
halfsort1.cpp:6:1: error: stray '\302' in program
 ofstream fout("halfsort1.out");

 ^
halfsort1.cpp:6:1: error: stray '\240' in program
halfsort1.cpp:8:1: error: stray '\302' in program
 void citire(int &n, int a[]);

 ^
halfsort1.cpp:8:1: error: stray '\240' in program
halfsort1.cpp:8:1: error: stray '\302' in program
halfsort1.cpp:8:1: error: stray '\240' in program
halfsort1.cpp:8:1: error: stray '\302' in program
halfsort1.cpp:8:1: error: stray '\240' in program
halfsort1.cpp:8:1: error: stray '\302' in program
halfsort1.cpp:8:1: error: stray '\240' in program
halfsort1.cpp:9:1: error: stray '\302' in program
 void afisare(int n, int a[]);

 ^
halfsort1.cpp:9:1: error: stray '\240' in program
halfsort1.cpp:9:1: error: stray '\302' in program
halfsort1.cpp:9:1: error: stray '\240' in program
halfsort1.cpp:9:1: error: stray '\302' in program
halfsort1.cpp:9:1: error: stray '\240' in program
halfsort1.cpp:9:1: error: stray '\302' in program
halfsort1.cpp:9:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
 void sortare(int n, int m, int a[]);

 ^
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:10:1: error: stray '\302' in program
halfsort1.cpp:10:1: error: stray '\240' in program
halfsort1.cpp:12:1: error: stray '\302' in program
 int main()

 ^
halfsort1.cpp:12:1: error: stray '\240' in program
halfsort1.cpp:15:1: error: stray '\302' in program
     int n,a[101];

 ^
halfsort1.cpp:15:1: error: stray '\240' in program
halfsort1.cpp:15:1: error: stray '\302' in program
halfsort1.cpp:15:1: error: stray '\240' in program
halfsort1.cpp:15:1: error: stray '\302' in program
halfsort1.cpp:15:1: error: stray '\240' in program
halfsort1.cpp:15:1: error: stray '\302' in program
halfsort1.cpp:15:1: error: stray '\240' in program
halfsort1.cpp:15:1: error: stray '\302' in program
halfsort1.cpp:15:1: error: stray '\240' in program
halfsort1.cpp:17:1: error: stray '\302' in program
     citire(n,a);

 ^
halfsort1.cpp:17:1: error: stray '\240' in program
halfsort1.cpp:17:1: error: stray '\302' in program
halfsort1.cpp:17:1: error: stray '\240' in program
halfsort1.cpp:17:1: error: stray '\302' in program
halfsort1.cpp:17:1: error: stray '\240' in program
halfsort1.cpp:17:1: error: stray '\302' in program
halfsort1.cpp:17:1: error: stray '\240' in program
halfsort1.cpp:18:1: error: stray '\302' in program
     sortare(n,n/2,a);

 ^
halfsort1.cpp:18:1: error: stray '\240' in program
halfsort1.cpp:18:1: error: stray '\302' in program
halfsort1.cpp:18:1: error: stray '\240' in program
halfsort1.cpp:18:1: error: stray '\302' in program
halfsort1.cpp:18:1: error: stray '\240' in program
halfsort1.cpp:18:1: error: stray '\302' in program
halfsort1.cpp:18:1: error: stray '\240' in program
halfsort1.cpp:19:1: error: stray '\302' in program
     afisare(n,a);

 ^
halfsort1.cpp:19:1: error: stray '\240' in program
halfsort1.cpp:19:1: error: stray '\302' in program
halfsort1.cpp:19:1: error: stray '\240' in program
halfsort1.cpp:19:1: error: stray '\302' in program
halfsort1.cpp:19:1: error: stray '\240' in program
halfsort1.cpp:19:1: error: stray '\302' in program
halfsort1.cpp:19:1: error: stray '\240' in program
halfsort1.cpp:21:1: error: stray '\302' in program
     return 0;

 ^
halfsort1.cpp:21:1: error: stray '\240' in program
halfsort1.cpp:21:1: error: stray '\302' in program
halfsort1.cpp:21:1: error: stray '\240' in program
halfsort1.cpp:21:1: error: stray '\302' in program
halfsort1.cpp:21:1: error: stray '\240' in program
halfsort1.cpp:21:1: error: stray '\302' in program
halfsort1.cpp:21:1: error: stray '\240' in program
halfsort1.cpp:21:1: error: stray '\302' in program
halfsort1.cpp:21:1: error: stray '\240' in program
halfsort1.cpp:25:1: error: stray '\302' in program
 void citire(int &n, int a[])

 ^
halfsort1.cpp:25:1: error: stray '\240' in program
halfsort1.cpp:25:1: error: stray '\302' in program
halfsort1.cpp:25:1: error: stray '\240' in program
halfsort1.cpp:25:1: error: stray '\302' in program
halfsort1.cpp:25:1: error: stray '\240' in program
halfsort1.cpp:25:1: error: stray '\302' in program
halfsort1.cpp:25:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
     fin >> n;

 ^
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:27:1: error: stray '\302' in program
halfsort1.cpp:27:1: error: stray '\240' in program
halfsort1.cpp:28:1: error: stray '\302' in program
     for(int i=1;i<=n;i++)

 ^
halfsort1.cpp:28:1: error: stray '\240' in program
halfsort1.cpp:28:1: error: stray '\302' in program
halfsort1.cpp:28:1: error: stray '\240' in program
halfsort1.cpp:28:1: error: stray '\302' in program
halfsort1.cpp:28:1: error: stray '\240' in program
halfsort1.cpp:28:1: error: stray '\302' in program
halfsort1.cpp:28:1: error: stray '\240' in program
halfsort1.cpp:28:1: error: stray '\302' in program
halfsort1.cpp:28:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
         fin >> a[i];

 ^
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:29:1: error: stray '\302' in program
halfsort1.cpp:29:1: error: stray '\240' in program
halfsort1.cpp:32:1: error: stray '\302' in program
 void afisare(int n, int a[])

 ^
halfsort1.cpp:32:1: error: stray '\240' in program
halfsort1.cpp:32:1: error: stray '\302' in program
halfsort1.cpp:32:1: error: stray '\240' in program
halfsort1.cpp:32:1: error: stray '\302' in program
halfsort1.cpp:32:1: error: stray '\240' in program
halfsort1.cpp:32:1: error: stray '\302' in program
halfsort1.cpp:32:1: error: stray '\240' in program
halfsort1.cpp:34:1: error: stray '\302' in program
     for(int i=1;i<=n;i++)

 ^
halfsort1.cpp:34:1: error: stray '\240' in program
halfsort1.cpp:34:1: error: stray '\302' in program
halfsort1.cpp:34:1: error: stray '\240' in program
halfsort1.cpp:34:1: error: stray '\302' in program
halfsort1.cpp:34:1: error: stray '\240' in program
halfsort1.cpp:34:1: error: stray '\302' in program
halfsort1.cpp:34:1: error: stray '\240' in program
halfsort1.cpp:34:1: error: stray '\302' in program
halfsort1.cpp:34:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
         fout << a[i] << " ";

 ^
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:35:1: error: stray '\302' in program
halfsort1.cpp:35:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
 void sortare(int n, int m, int a[])

 ^
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:38:1: error: stray '\302' in program
halfsort1.cpp:38:1: error: stray '\240' in program
halfsort1.cpp:40:1: error: stray '\302' in program
     for(int i=1;i<m;i++)

 ^
halfsort1.cpp:40:1: error: stray '\240' in program
halfsort1.cpp:40:1: error: stray '\302' in program
halfsort1.cpp:40:1: error: stray '\240' in program
halfsort1.cpp:40:1: error: stray '\302' in program
halfsort1.cpp:40:1: error: stray '\240' in program
halfsort1.cpp:40:1: error: stray '\302' in program
halfsort1.cpp:40:1: error: stray '\240' in program
halfsort1.cpp:40:1: error: stray '\302' in program
halfsort1.cpp:40:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
         for(int j=i+1;j<=m;j++)

 ^
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:41:1: error: stray '\302' in program
halfsort1.cpp:41:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
             if(a[i]>a[j])

 ^
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:42:1: error: stray '\302' in program
halfsort1.cpp:42:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
                 swap(a[i],a[j]);

 ^
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:43:1: error: stray '\302' in program
halfsort1.cpp:43:1: error: stray '\240' in program
halfsort1.cpp:45:1: error: stray '\302' in program
     for(int i=m+1;i<n;i++)

 ^
halfsort1.cpp:45:1: error: stray '\240' in program
halfsort1.cpp:45:1: error: stray '\302' in program
halfsort1.cpp:45:1: error: stray '\240' in program
halfsort1.cpp:45:1: error: stray '\302' in program
halfsort1.cpp:45:1: error: stray '\240' in program
halfsort1.cpp:45:1: error: stray '\302' in program
halfsort1.cpp:45:1: error: stray '\240' in program
halfsort1.cpp:45:1: error: stray '\302' in program
halfsort1.cpp:45:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
         for(int j=i+1;j<=n;j++)

 ^
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:46:1: error: stray '\302' in program
halfsort1.cpp:46:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
             if(a[i]<a[j])

 ^
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:47:1: error: stray '\302' in program
halfsort1.cpp:47:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
                 swap(a[i],a[j]);

 ^
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:48:1: error: stray '\302' in program
halfsort1.cpp:48:1: error: stray '\240' in program
halfsort1.cpp:5:1: error: 'ifstream' does not name a type
 ifstream fin("halfsort1.in");

 ^
halfsort1.cpp:6:1: error: 'ofstream' does not name a type
 ofstream fout("halfsort1.out");

 ^
halfsort1.cpp: In function 'void citire(int&, int*)':
halfsort1.cpp:27:9: error: 'fin' was not declared in this scope
     fin >> n;

         ^
halfsort1.cpp: In function 'void afisare(int, int*)':
halfsort1.cpp:35:17: error: 'fout' was not declared in this scope
         fout << a[i] << " ";

                 ^
halfsort1.cpp: In function 'void sortare(int, int, int*)':
halfsort1.cpp:43:47: error: 'swap' was not declared in this scope
                 swap(a[i],a[j]);

                                               ^
halfsort1.cpp:48:47: error: 'swap' was not declared in this scope
                 swap(a[i],a[j]);

                                               ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema HalfSort1 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.