Detalii evaluare #52946047

Rezumat problemă

Scrabble (jocul cuvintelor) este un joc în care participanții formează cuvinte prin plasarea de litere pe orizontală sau pe verticală, iar punctajul obținut este cu atât mai mare cu cât literele folosite sunt mai rare (mai valoroase). Vă propunem un altfel de scrabble, joc unde jucătorul primește n piese speciale de scrabble. Fiecare piesă are inscripționate două litere mari ale alfabetului englez A...Z, una dintre litere fiind consoană, cealaltă fiind vocală. Jucătorul poate forma cuvinte prin alăturarea pieselor pe orizontală. Un cuvânt este considerat valid dacă respectă următoarele condiții:
  • folosește cel puțin două piese;
  • cuvântul format nu conține pe poziții consecutive litere egale sau litere de același tip (vocale/consoane).

Cuvântul este cu atât mai valoros cu cât folosește mai multe piese de scrabble.

Detalii

Problema scrabble Operații I/O scrabble.in/scrabble.out
Limita timp 0.7 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #52946047 Utilizator Rus Rares (RaresRus)
Fișier scrabble.cpp Dimensiune 1.37 KB
Data încărcării 13 Octombrie 2024, 22:34 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

scrabble.cpp:16:1: error: stray '\302' in program
     if (k>=nrmax)

 ^
scrabble.cpp:16:1: error: stray '\240' in program
scrabble.cpp:16:1: error: stray '\302' in program
scrabble.cpp:16:1: error: stray '\240' in program
scrabble.cpp:17:1: error: stray '\302' in program
     {

 ^
scrabble.cpp:17:1: error: stray '\240' in program
scrabble.cpp:17:1: error: stray '\302' in program
scrabble.cpp:17:1: error: stray '\240' in program
scrabble.cpp:18:1: error: stray '\302' in program
         nrmax=k;

 ^
scrabble.cpp:18:1: error: stray '\240' in program
scrabble.cpp:18:1: error: stray '\302' in program
scrabble.cpp:18:1: error: stray '\240' in program
scrabble.cpp:18:1: error: stray '\302' in program
scrabble.cpp:18:1: error: stray '\240' in program
scrabble.cpp:18:1: error: stray '\302' in program
scrabble.cpp:18:1: error: stray '\240' in program
scrabble.cpp:19:1: error: stray '\302' in program
         for (int i=1; i<=k; ++i)

 ^
scrabble.cpp:19:1: error: stray '\240' in program
scrabble.cpp:19:1: error: stray '\302' in program
scrabble.cpp:19:1: error: stray '\240' in program
scrabble.cpp:19:1: error: stray '\302' in program
scrabble.cpp:19:1: error: stray '\240' in program
scrabble.cpp:19:1: error: stray '\302' in program
scrabble.cpp:19:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
             smax[i]=s[i];

 ^
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:20:1: error: stray '\302' in program
scrabble.cpp:20:1: error: stray '\240' in program
scrabble.cpp:21:1: error: stray '\302' in program
     }

 ^
scrabble.cpp:21:1: error: stray '\240' in program
scrabble.cpp:21:1: error: stray '\302' in program
scrabble.cpp:21:1: error: stray '\240' in program
scrabble.cpp:27:1: error: stray '\302' in program
     if (k>1 and strchr(voc, piesa[s[k]][0]) and strchr(voc, piesa[s[k-1]][1])) return 0;

 ^
scrabble.cpp:27:1: error: stray '\240' in program
scrabble.cpp:27:1: error: stray '\302' in program
scrabble.cpp:27:1: error: stray '\240' in program
scrabble.cpp:28:1: error: stray '\302' in program
     if (k>1 and !strchr(voc, piesa[s[k]][0]) and !strchr(voc, piesa[s[k-1]][1])) return 0;

 ^
scrabble.cpp:28:1: error: stray '\240' in program
scrabble.cpp:28:1: error: stray '\302' in program
scrabble.cpp:28:1: error: stray '\240' in program
scrabble.cpp:29:1: error: stray '\302' in program
     return 1;

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

 ^
scrabble.cpp:34:1: error: stray '\240' in program
scrabble.cpp:34:1: error: stray '\302' in program
scrabble.cpp:34:1: error: stray '\240' in program
scrabble.cpp:35:1: error: stray '\302' in program
         if (!folosit [i])

 ^
scrabble.cpp:35:1: error: stray '\240' in program
scrabble.cpp:35:1: error: stray '\302' in program
scrabble.cpp:35:1: error: stray '\240' in program
scrabble.cpp:35:1: error: stray '\302' in program
scrabble.cpp:35:1: error: stray '\240' in program
scrabble.cpp:35:1: error: stray '\302' in program
scrabble.cpp:35:1: error: stray '\240' in program
scrabble.cpp:36:1: error: stray '\302' in program
         {

 ^
scrabble.cpp:36:1: error: stray '\240' in program
scrabble.cpp:36:1: error: stray '\302' in program
scrabble.cpp:36:1: error: stray '\240' in program
scrabble.cpp:36:1: error: stray '\302' in program
scrabble.cpp:36:1: error: stray '\240' in program
scrabble.cpp:36:1: error: stray '\302' in program
scrabble.cpp:36:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
             s[k]=i;

 ^
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:37:1: error: stray '\302' in program
scrabble.cpp:37:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
             folosit[i]=1;

 ^
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:38:1: error: stray '\302' in program
scrabble.cpp:38:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
             if (Valid (k))

 ^
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:39:1: error: stray '\302' in program
scrabble.cpp:39:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
             {

 ^
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:40:1: error: stray '\302' in program
scrabble.cpp:40:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
                 if (k>1) Afis(k);

 ^
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:41:1: error: stray '\302' in program
scrabble.cpp:41:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
                  Back (k+1);

 ^
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:42:1: error: stray '\302' in program
scrabble.cpp:42:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
             }

 ^
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:43:1: error: stray '\302' in program
scrabble.cpp:43:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
             folosit[i]=0;

 ^
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:46:1: error: stray '\302' in program
scrabble.cpp:46:1: error: stray '\240' in program
scrabble.cpp:48:1: error: stray '\302' in program
         }

 ^
scrabble.cpp:48:1: error: stray '\240' in program
scrabble.cpp:48:1: error: stray '\302' in program
scrabble.cpp:48:1: error: stray '\240' in program
scrabble.cpp:48:1: error: stray '\302' in program
scrabble.cpp:48:1: error: stray '\240' in program
scrabble.cpp:48:1: error: stray '\302' in program
scrabble.cpp:48:1: error: stray '\240' in program
scrabble.cpp:53:1: error: stray '\302' in program
     fin>>n;

 ^
scrabble.cpp:53:1: error: stray '\240' in program
scrabble.cpp:53:1: error: stray '\302' in program
scrabble.cpp:53:1: error: stray '\240' in program
scrabble.cpp:54:1: error: stray '\302' in program
     for (int i=1; i<=n; ++i)

 ^
scrabble.cpp:54:1: error: stray '\240' in program
scrabble.cpp:54:1: error: stray '\302' in program
scrabble.cpp:54:1: error: stray '\240' in program
scrabble.cpp:55:1: error: stray '\302' in program
         fin>>piesa[i];

 ^
scrabble.cpp:55:1: error: stray '\240' in program
scrabble.cpp:55:1: error: stray '\302' in program
scrabble.cpp:55:1: error: stray '\240' in program
scrabble.cpp:55:1: error: stray '\302' in program
scrabble.cpp:55:1: error: stray '\240' in program
scrabble.cpp:55:1: error: stray '\302' in program
scrabble.cpp:55:1: error: stray '\240' in program
scrabble.cpp:56:1: error: stray '\302' in program
     for (int i=1; i<=n-1; i++)

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

 ^
scrabble.cpp:57:1: error: stray '\240' in program
scrabble.cpp:57:1: error: stray '\302' in program
scrabble.cpp:57:1: error: stray '\240' in program
scrabble.cpp:57:1: error: stray '\302' in program
scrabble.cpp:57:1: error: stray '\240' in program
scrabble.cpp:57:1: error: stray '\302' in program
scrabble.cpp:57:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
             if (strcmp(piesa[i],piesa[j])>0)

 ^
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:58:1: error: stray '\302' in program
scrabble.cpp:58:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
                 swap (piesa[i], piesa[j]);

 ^
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:59:1: error: stray '\302' in program
scrabble.cpp:59:1: error: stray '\240' in program
scrabble.cpp:60:1: error: stray '\302' in program
     Back(1);

 ^
scrabble.cpp:60:1: error: stray '\240' in program
scrabble.cpp:60:1: error: stray '\302' in program
scrabble.cpp:60:1: error: stray '\240' in program
scrabble.cpp:62:1: error: stray '\302' in program
     for (int i=1; i<=nrmax; ++i)

 ^
scrabble.cpp:62:1: error: stray '\240' in program
scrabble.cpp:62:1: error: stray '\302' in program
scrabble.cpp:62:1: error: stray '\240' in program
scrabble.cpp:63:1: error: stray '\302' in program
         fout<<piesa[smax[i]];

 ^
scrabble.cpp:63:1: error: stray '\240' in program
scrabble.cpp:63:1: error: stray '\302' in program
scrabble.cpp:63:1: error: stray '\240' in program
scrabble.cpp:63:1: error: stray '\302' in program
scrabble.cpp:63:1: error: stray '\240' in program
scrabble.cpp:63:1: error: stray '\302' in program
scrabble.cpp:63:1: error: stray '\240' in program
scrabble.cpp:64:1: error: stray '\302' in program
     return 0;

 ^
scrabble.cpp:64:1: error: stray '\240' in program
scrabble.cpp:64:1: error: stray '\302' in program
scrabble.cpp:64: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 scrabble 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ă.