Detalii evaluare #15909422

Rezumat problemă

Se dau mai multe șiruri de caractere. Pentru fiecare șir, afișați șirul format doar din caracterele aflate pe poziții impare și șirul format din caracterele aflate pe poziții pare. Cele două șiruri vor fi separate printr-un singur spațiu, pe câte o linie.

Detalii

Problema ParitateSiruri Operații I/O paritatesiruri.in/paritatesiruri.out
Limita timp 1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #15909422 Utilizator suteu ionut (suteuionut)
Fișier paritatesiruri.cpp Dimensiune 777 B
Data încărcării 20 Mai 2019, 12:33 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

paritatesiruri.cpp:9:2: error: stray '\302' in program
     int K, s, i, p;

  ^
paritatesiruri.cpp:9:2: error: stray '\240' in program
paritatesiruri.cpp:9:2: error: stray '\302' in program
paritatesiruri.cpp:9:2: error: stray '\240' in program
paritatesiruri.cpp:10:2: error: stray '\302' in program
     char sir[255], sir1[255], sir2[255];

  ^
paritatesiruri.cpp:10:2: error: stray '\240' in program
paritatesiruri.cpp:10:2: error: stray '\302' in program
paritatesiruri.cpp:10:2: error: stray '\240' in program
paritatesiruri.cpp:11:2: error: stray '\302' in program
     fin>>K;

  ^
paritatesiruri.cpp:11:2: error: stray '\240' in program
paritatesiruri.cpp:11:2: error: stray '\302' in program
paritatesiruri.cpp:11:2: error: stray '\240' in program
paritatesiruri.cpp:12:2: error: stray '\302' in program
     for(s=1;s<=K;s++)

  ^
paritatesiruri.cpp:12:2: error: stray '\240' in program
paritatesiruri.cpp:12:2: error: stray '\302' in program
paritatesiruri.cpp:12:2: error: stray '\240' in program
paritatesiruri.cpp:13:2: error: stray '\302' in program
     {

  ^
paritatesiruri.cpp:13:2: error: stray '\240' in program
paritatesiruri.cpp:13:2: error: stray '\302' in program
paritatesiruri.cpp:13:2: error: stray '\240' in program
paritatesiruri.cpp:14:2: error: stray '\302' in program
         fin>>sir;

  ^
paritatesiruri.cpp:14:2: error: stray '\240' in program
paritatesiruri.cpp:14:2: error: stray '\302' in program
paritatesiruri.cpp:14:2: error: stray '\240' in program
paritatesiruri.cpp:14:2: error: stray '\302' in program
paritatesiruri.cpp:14:2: error: stray '\240' in program
paritatesiruri.cpp:14:2: error: stray '\302' in program
paritatesiruri.cpp:14:2: error: stray '\240' in program
paritatesiruri.cpp:15:2: error: stray '\302' in program
         sir1[0]='\0'; sir2[0]='\0';

  ^
paritatesiruri.cpp:15:2: error: stray '\240' in program
paritatesiruri.cpp:15:2: error: stray '\302' in program
paritatesiruri.cpp:15:2: error: stray '\240' in program
paritatesiruri.cpp:15:2: error: stray '\302' in program
paritatesiruri.cpp:15:2: error: stray '\240' in program
paritatesiruri.cpp:15:2: error: stray '\302' in program
paritatesiruri.cpp:15:2: error: stray '\240' in program
paritatesiruri.cpp:16:2: error: stray '\302' in program
         p=0;

  ^
paritatesiruri.cpp:16:2: error: stray '\240' in program
paritatesiruri.cpp:16:2: error: stray '\302' in program
paritatesiruri.cpp:16:2: error: stray '\240' in program
paritatesiruri.cpp:16:2: error: stray '\302' in program
paritatesiruri.cpp:16:2: error: stray '\240' in program
paritatesiruri.cpp:16:2: error: stray '\302' in program
paritatesiruri.cpp:16:2: error: stray '\240' in program
paritatesiruri.cpp:17:2: error: stray '\302' in program
         for(i=1;i<strlen(sir);i=i+2)

  ^
paritatesiruri.cpp:17:2: error: stray '\240' in program
paritatesiruri.cpp:17:2: error: stray '\302' in program
paritatesiruri.cpp:17:2: error: stray '\240' in program
paritatesiruri.cpp:17:2: error: stray '\302' in program
paritatesiruri.cpp:17:2: error: stray '\240' in program
paritatesiruri.cpp:17:2: error: stray '\302' in program
paritatesiruri.cpp:17:2: error: stray '\240' in program
paritatesiruri.cpp:18:2: error: stray '\302' in program
         {

  ^
paritatesiruri.cpp:18:2: error: stray '\240' in program
paritatesiruri.cpp:18:2: error: stray '\302' in program
paritatesiruri.cpp:18:2: error: stray '\240' in program
paritatesiruri.cpp:18:2: error: stray '\302' in program
paritatesiruri.cpp:18:2: error: stray '\240' in program
paritatesiruri.cpp:18:2: error: stray '\302' in program
paritatesiruri.cpp:18:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
             sir1[p]=sir[i]; p++;

  ^
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:19:2: error: stray '\302' in program
paritatesiruri.cpp:19:2: error: stray '\240' in program
paritatesiruri.cpp:20:2: error: stray '\302' in program
         }

  ^
paritatesiruri.cpp:20:2: error: stray '\240' in program
paritatesiruri.cpp:20:2: error: stray '\302' in program
paritatesiruri.cpp:20:2: error: stray '\240' in program
paritatesiruri.cpp:20:2: error: stray '\302' in program
paritatesiruri.cpp:20:2: error: stray '\240' in program
paritatesiruri.cpp:20:2: error: stray '\302' in program
paritatesiruri.cpp:20:2: error: stray '\240' in program
paritatesiruri.cpp:21:2: error: stray '\302' in program
         sir1[p]='\0';

  ^
paritatesiruri.cpp:21:2: error: stray '\240' in program
paritatesiruri.cpp:21:2: error: stray '\302' in program
paritatesiruri.cpp:21:2: error: stray '\240' in program
paritatesiruri.cpp:21:2: error: stray '\302' in program
paritatesiruri.cpp:21:2: error: stray '\240' in program
paritatesiruri.cpp:21:2: error: stray '\302' in program
paritatesiruri.cpp:21:2: error: stray '\240' in program
paritatesiruri.cpp:22:2: error: stray '\302' in program
         p=0;

  ^
paritatesiruri.cpp:22:2: error: stray '\240' in program
paritatesiruri.cpp:22:2: error: stray '\302' in program
paritatesiruri.cpp:22:2: error: stray '\240' in program
paritatesiruri.cpp:22:2: error: stray '\302' in program
paritatesiruri.cpp:22:2: error: stray '\240' in program
paritatesiruri.cpp:22:2: error: stray '\302' in program
paritatesiruri.cpp:22:2: error: stray '\240' in program
paritatesiruri.cpp:23:2: error: stray '\302' in program
         for(i=0;i<strlen(sir);i=i+2)

  ^
paritatesiruri.cpp:23:2: error: stray '\240' in program
paritatesiruri.cpp:23:2: error: stray '\302' in program
paritatesiruri.cpp:23:2: error: stray '\240' in program
paritatesiruri.cpp:23:2: error: stray '\302' in program
paritatesiruri.cpp:23:2: error: stray '\240' in program
paritatesiruri.cpp:23:2: error: stray '\302' in program
paritatesiruri.cpp:23:2: error: stray '\240' in program
paritatesiruri.cpp:24:2: error: stray '\302' in program
         {

  ^
paritatesiruri.cpp:24:2: error: stray '\240' in program
paritatesiruri.cpp:24:2: error: stray '\302' in program
paritatesiruri.cpp:24:2: error: stray '\240' in program
paritatesiruri.cpp:24:2: error: stray '\302' in program
paritatesiruri.cpp:24:2: error: stray '\240' in program
paritatesiruri.cpp:24:2: error: stray '\302' in program
paritatesiruri.cpp:24:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
             sir2[p]=sir[i]; p++;

  ^
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:25:2: error: stray '\302' in program
paritatesiruri.cpp:25:2: error: stray '\240' in program
paritatesiruri.cpp:26:2: error: stray '\302' in program
         }

  ^
paritatesiruri.cpp:26:2: error: stray '\240' in program
paritatesiruri.cpp:26:2: error: stray '\302' in program
paritatesiruri.cpp:26:2: error: stray '\240' in program
paritatesiruri.cpp:26:2: error: stray '\302' in program
paritatesiruri.cpp:26:2: error: stray '\240' in program
paritatesiruri.cpp:26:2: error: stray '\302' in program
paritatesiruri.cpp:26:2: error: stray '\240' in program
paritatesiruri.cpp:27:2: error: stray '\302' in program
         sir2[p]='\0';

  ^
paritatesiruri.cpp:27:2: error: stray '\240' in program
paritatesiruri.cpp:27:2: error: stray '\302' in program
paritatesiruri.cpp:27:2: error: stray '\240' in program
paritatesiruri.cpp:27:2: error: stray '\302' in program
paritatesiruri.cpp:27:2: error: stray '\240' in program
paritatesiruri.cpp:27:2: error: stray '\302' in program
paritatesiruri.cpp:27:2: error: stray '\240' in program
paritatesiruri.cpp:28:2: error: stray '\302' in program
         fout<<sir1<<' '<<sir2<<'\n';

  ^
paritatesiruri.cpp:28:2: error: stray '\240' in program
paritatesiruri.cpp:28:2: error: stray '\302' in program
paritatesiruri.cpp:28:2: error: stray '\240' in program
paritatesiruri.cpp:28:2: error: stray '\302' in program
paritatesiruri.cpp:28:2: error: stray '\240' in program
paritatesiruri.cpp:28:2: error: stray '\302' in program
paritatesiruri.cpp:28:2: error: stray '\240' in program
paritatesiruri.cpp:29:2: error: stray '\302' in program
     }

  ^
paritatesiruri.cpp:29:2: error: stray '\240' in program
paritatesiruri.cpp:29:2: error: stray '\302' in program
paritatesiruri.cpp:29:2: error: stray '\240' in program
paritatesiruri.cpp:30:2: error: stray '\302' in program
     fin.close();

  ^
paritatesiruri.cpp:30:2: error: stray '\240' in program
paritatesiruri.cpp:30:2: error: stray '\302' in program
paritatesiruri.cpp:30:2: error: stray '\240' in program
paritatesiruri.cpp:31:2: error: stray '\302' in program
     fout.close();

  ^
paritatesiruri.cpp:31:2: error: stray '\240' in program
paritatesiruri.cpp:31:2: error: stray '\302' in program
paritatesiruri.cpp:31:2: error: stray '\240' in program
paritatesiruri.cpp:32:2: error: stray '\302' in program
     return 0;

  ^
paritatesiruri.cpp:32:2: error: stray '\240' in program
paritatesiruri.cpp:32:2: error: stray '\302' in program
paritatesiruri.cpp:32:2: error: stray '\240' in program
paritatesiruri.cpp: In function 'int main()':
paritatesiruri.cpp:17:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(i=1;i<strlen(sir);i=i+2)

                                 ^
paritatesiruri.cpp:23:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(i=0;i<strlen(sir);i=i+2)

                                 ^

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