Detalii evaluare #44677748

Rezumat problemă

Se dă un șir de caractere în care cuvintele sunt formate din litere mici și mari ale alfabetului englez și sunt separate prin spații.

Să se afișeze cuvintele pe ecran, fiecare cuvânt pe câte o linie, în ordinea descrescătoare a numărului de litere. Dacă două cuvinte au același număr de litere atunci ele se vor afișa în ordine lexicografică.

Detalii

Problema LungSortDesc Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #44677748 Utilizator Balan Monica (monicab_____________________)
Fișier lungsortdesc.cpp Dimensiune 1.09 KB
Data încărcării 18 Septembrie 2023, 12:38 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

lungsortdesc.cpp:7:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:7:1: error: stray '\240' in program
lungsortdesc.cpp:11:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:11:1: error: stray '\240' in program
lungsortdesc.cpp:16:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:16:1: error: stray '\240' in program
lungsortdesc.cpp:19:1: error: stray '\302' in program
     int lungime;

 ^
lungsortdesc.cpp:19:1: error: stray '\240' in program
lungsortdesc.cpp:19:1: error: stray '\302' in program
lungsortdesc.cpp:19:1: error: stray '\240' in program
lungsortdesc.cpp:19:1: error: stray '\302' in program
lungsortdesc.cpp:19:1: error: stray '\240' in program
lungsortdesc.cpp:20:1: error: stray '\302' in program
     int loc;

 ^
lungsortdesc.cpp:20:1: error: stray '\240' in program
lungsortdesc.cpp:20:1: error: stray '\302' in program
lungsortdesc.cpp:20:1: error: stray '\240' in program
lungsortdesc.cpp:20:1: error: stray '\302' in program
lungsortdesc.cpp:20:1: error: stray '\240' in program
lungsortdesc.cpp:23:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:23:1: error: stray '\240' in program
lungsortdesc.cpp:27:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:27:1: error: stray '\240' in program
lungsortdesc.cpp:29:1: error: stray '\302' in program
 bool cmp(ord a, ord b) 

 ^
lungsortdesc.cpp:29:1: error: stray '\240' in program
lungsortdesc.cpp:31:1: error: stray '\302' in program
     if (a.lungime != b.lungime)

 ^
lungsortdesc.cpp:31:1: error: stray '\240' in program
lungsortdesc.cpp:31:1: error: stray '\302' in program
lungsortdesc.cpp:31:1: error: stray '\240' in program
lungsortdesc.cpp:31:1: error: stray '\302' in program
lungsortdesc.cpp:31:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
         return a.lungime > b.lungime;

 ^
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:32:1: error: stray '\302' in program
lungsortdesc.cpp:32:1: error: stray '\240' in program
lungsortdesc.cpp:33:1: error: stray '\302' in program
     else 

 ^
lungsortdesc.cpp:33:1: error: stray '\240' in program
lungsortdesc.cpp:33:1: error: stray '\302' in program
lungsortdesc.cpp:33:1: error: stray '\240' in program
lungsortdesc.cpp:33:1: error: stray '\302' in program
lungsortdesc.cpp:33:1: error: stray '\240' in program
lungsortdesc.cpp:33:1: error: stray '\302' in program
lungsortdesc.cpp:33:1: error: stray '\240' in program
lungsortdesc.cpp:34:1: error: stray '\302' in program
     {

 ^
lungsortdesc.cpp:34:1: error: stray '\240' in program
lungsortdesc.cpp:34:1: error: stray '\302' in program
lungsortdesc.cpp:34:1: error: stray '\240' in program
lungsortdesc.cpp:34:1: error: stray '\302' in program
lungsortdesc.cpp:34:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
         return (strcmp(cuvinte[a.loc], cuvinte[b.loc]) < 0);

 ^
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:35:1: error: stray '\302' in program
lungsortdesc.cpp:35:1: error: stray '\240' in program
lungsortdesc.cpp:36:1: error: stray '\302' in program
     }

 ^
lungsortdesc.cpp:36:1: error: stray '\240' in program
lungsortdesc.cpp:36:1: error: stray '\302' in program
lungsortdesc.cpp:36:1: error: stray '\240' in program
lungsortdesc.cpp:36:1: error: stray '\302' in program
lungsortdesc.cpp:36:1: error: stray '\240' in program
lungsortdesc.cpp:39:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:39:1: error: stray '\240' in program
lungsortdesc.cpp:43:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:43:1: error: stray '\240' in program
lungsortdesc.cpp:45:1: error: stray '\302' in program
     cin.getline(s, 260);

 ^
lungsortdesc.cpp:45:1: error: stray '\240' in program
lungsortdesc.cpp:45:1: error: stray '\302' in program
lungsortdesc.cpp:45:1: error: stray '\240' in program
lungsortdesc.cpp:45:1: error: stray '\302' in program
lungsortdesc.cpp:45:1: error: stray '\240' in program
lungsortdesc.cpp:46:1: error: stray '\302' in program
     char* p;

 ^
lungsortdesc.cpp:46:1: error: stray '\240' in program
lungsortdesc.cpp:46:1: error: stray '\302' in program
lungsortdesc.cpp:46:1: error: stray '\240' in program
lungsortdesc.cpp:46:1: error: stray '\302' in program
lungsortdesc.cpp:46:1: error: stray '\240' in program
lungsortdesc.cpp:47:1: error: stray '\302' in program
     p = strtok(s, " ");

 ^
lungsortdesc.cpp:47:1: error: stray '\240' in program
lungsortdesc.cpp:47:1: error: stray '\302' in program
lungsortdesc.cpp:47:1: error: stray '\240' in program
lungsortdesc.cpp:47:1: error: stray '\302' in program
lungsortdesc.cpp:47:1: error: stray '\240' in program
lungsortdesc.cpp:49:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:49:1: error: stray '\240' in program
lungsortdesc.cpp:51:1: error: stray '\302' in program
     int cnt = 0;

 ^
lungsortdesc.cpp:51:1: error: stray '\240' in program
lungsortdesc.cpp:51:1: error: stray '\302' in program
lungsortdesc.cpp:51:1: error: stray '\240' in program
lungsortdesc.cpp:51:1: error: stray '\302' in program
lungsortdesc.cpp:51:1: error: stray '\240' in program
lungsortdesc.cpp:52:1: error: stray '\302' in program
     while (p != NULL) 

 ^
lungsortdesc.cpp:52:1: error: stray '\240' in program
lungsortdesc.cpp:52:1: error: stray '\302' in program
lungsortdesc.cpp:52:1: error: stray '\240' in program
lungsortdesc.cpp:52:1: error: stray '\302' in program
lungsortdesc.cpp:52:1: error: stray '\240' in program
lungsortdesc.cpp:52:1: error: stray '\302' in program
lungsortdesc.cpp:52:1: error: stray '\240' in program
lungsortdesc.cpp:53:1: error: stray '\302' in program
     {

 ^
lungsortdesc.cpp:53:1: error: stray '\240' in program
lungsortdesc.cpp:53:1: error: stray '\302' in program
lungsortdesc.cpp:53:1: error: stray '\240' in program
lungsortdesc.cpp:53:1: error: stray '\302' in program
lungsortdesc.cpp:53:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
         cnt++;

 ^
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:54:1: error: stray '\302' in program
lungsortdesc.cpp:54:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
         strcpy(cuvinte[cnt], p);

 ^
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:55:1: error: stray '\302' in program
lungsortdesc.cpp:55:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
         p = strtok(NULL, " ");

 ^
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:56:1: error: stray '\302' in program
lungsortdesc.cpp:56:1: error: stray '\240' in program
lungsortdesc.cpp:57:1: error: stray '\302' in program
     }

 ^
lungsortdesc.cpp:57:1: error: stray '\240' in program
lungsortdesc.cpp:57:1: error: stray '\302' in program
lungsortdesc.cpp:57:1: error: stray '\240' in program
lungsortdesc.cpp:57:1: error: stray '\302' in program
lungsortdesc.cpp:57:1: error: stray '\240' in program
lungsortdesc.cpp:59:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:59:1: error: stray '\240' in program
lungsortdesc.cpp:61:1: error: stray '\302' in program
     for (int i = 1; i <= cnt; i++) 

 ^
lungsortdesc.cpp:61:1: error: stray '\240' in program
lungsortdesc.cpp:61:1: error: stray '\302' in program
lungsortdesc.cpp:61:1: error: stray '\240' in program
lungsortdesc.cpp:61:1: error: stray '\302' in program
lungsortdesc.cpp:61:1: error: stray '\240' in program
lungsortdesc.cpp:61:1: error: stray '\302' in program
lungsortdesc.cpp:61:1: error: stray '\240' in program
lungsortdesc.cpp:62:1: error: stray '\302' in program
     {

 ^
lungsortdesc.cpp:62:1: error: stray '\240' in program
lungsortdesc.cpp:62:1: error: stray '\302' in program
lungsortdesc.cpp:62:1: error: stray '\240' in program
lungsortdesc.cpp:62:1: error: stray '\302' in program
lungsortdesc.cpp:62:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
         d[i].loc = i;

 ^
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:63:1: error: stray '\302' in program
lungsortdesc.cpp:63:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
         d[i].lungime = strlen(cuvinte[i]);

 ^
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:64:1: error: stray '\302' in program
lungsortdesc.cpp:64:1: error: stray '\240' in program
lungsortdesc.cpp:65:1: error: stray '\302' in program
     }

 ^
lungsortdesc.cpp:65:1: error: stray '\240' in program
lungsortdesc.cpp:65:1: error: stray '\302' in program
lungsortdesc.cpp:65:1: error: stray '\240' in program
lungsortdesc.cpp:65:1: error: stray '\302' in program
lungsortdesc.cpp:65:1: error: stray '\240' in program
lungsortdesc.cpp:67:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:67:1: error: stray '\240' in program
lungsortdesc.cpp:69:1: error: stray '\302' in program
     sort(&d[1], &d[cnt + 1], cmp);

 ^
lungsortdesc.cpp:69:1: error: stray '\240' in program
lungsortdesc.cpp:69:1: error: stray '\302' in program
lungsortdesc.cpp:69:1: error: stray '\240' in program
lungsortdesc.cpp:69:1: error: stray '\302' in program
lungsortdesc.cpp:69:1: error: stray '\240' in program
lungsortdesc.cpp:71:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:71:1: error: stray '\240' in program
lungsortdesc.cpp:73:1: error: stray '\302' in program
     for (int i = 1; i <= cnt; i++) 

 ^
lungsortdesc.cpp:73:1: error: stray '\240' in program
lungsortdesc.cpp:73:1: error: stray '\302' in program
lungsortdesc.cpp:73:1: error: stray '\240' in program
lungsortdesc.cpp:73:1: error: stray '\302' in program
lungsortdesc.cpp:73:1: error: stray '\240' in program
lungsortdesc.cpp:73:1: error: stray '\302' in program
lungsortdesc.cpp:73:1: error: stray '\240' in program
lungsortdesc.cpp:74:1: error: stray '\302' in program
     {

 ^
lungsortdesc.cpp:74:1: error: stray '\240' in program
lungsortdesc.cpp:74:1: error: stray '\302' in program
lungsortdesc.cpp:74:1: error: stray '\240' in program
lungsortdesc.cpp:74:1: error: stray '\302' in program
lungsortdesc.cpp:74:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
         cout << cuvinte[d[i].loc] << '\n';

 ^
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:75:1: error: stray '\302' in program
lungsortdesc.cpp:75:1: error: stray '\240' in program
lungsortdesc.cpp:76:1: error: stray '\302' in program
     }

 ^
lungsortdesc.cpp:76:1: error: stray '\240' in program
lungsortdesc.cpp:76:1: error: stray '\302' in program
lungsortdesc.cpp:76:1: error: stray '\240' in program
lungsortdesc.cpp:76:1: error: stray '\302' in program
lungsortdesc.cpp:76:1: error: stray '\240' in program
lungsortdesc.cpp:78:1: error: stray '\302' in program
  

 ^
lungsortdesc.cpp:78:1: error: stray '\240' in program
lungsortdesc.cpp:80:1: error: stray '\302' in program
     return 0;

 ^
lungsortdesc.cpp:80:1: error: stray '\240' in program
lungsortdesc.cpp:80:1: error: stray '\302' in program
lungsortdesc.cpp:80:1: error: stray '\240' in program
lungsortdesc.cpp:80:1: error: stray '\302' in program
lungsortdesc.cpp:80:1: error: stray '\240' in program

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