Detalii evaluare #64484438

Rezumat problemă

#3808

Să se cripteze sau să se decripteze un mesaj folosind cifrul ADFGVX.

Detalii

Problema ADFGVX Operații I/O adfgvx.in/adfgvx.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64484438 Utilizator Bogdan Andrei (Bogdan21Andrei)
Fișier adfgvx.cpp Dimensiune 2.81 KB
Data încărcării 10 Mai 2026, 14:19 Scor/rezultat 100 puncte

Evaluare

Mesaj compilare

adfgvx.cpp: In function ‘int main()’:
adfgvx.cpp:18:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   18 |                 character[ch]+="A";
      |                           ^~
adfgvx.cpp:20:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   20 |                 character[ch]+="D";
      |                           ^~
adfgvx.cpp:22:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   22 |                 character[ch]+="F";
      |                           ^~
adfgvx.cpp:24:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   24 |                 character[ch]+="G";
      |                           ^~
adfgvx.cpp:26:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   26 |                 character[ch]+="V";
      |                           ^~
adfgvx.cpp:28:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   28 |                 character[ch]+="X";
      |                           ^~
adfgvx.cpp:30:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   30 |                 character[ch]+="A";
      |                           ^~
adfgvx.cpp:32:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   32 |                 character[ch]+="D";
      |                           ^~
adfgvx.cpp:34:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   34 |                 character[ch]+="F";
      |                           ^~
adfgvx.cpp:36:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   36 |                 character[ch]+="G";
      |                           ^~
adfgvx.cpp:38:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   38 |                 character[ch]+="V";
      |                           ^~
adfgvx.cpp:40:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   40 |                 character[ch]+="X";
      |                           ^~
adfgvx.cpp:41:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   41 |             string cuv=character[ch];
      |                                  ^~
adfgvx.cpp:47:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   47 |         for(int i=0;i<mesaj.size();i++)
      |                     ~^~~~~~~~~~~~~
adfgvx.cpp:48:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   48 |             criptmesaj+=character[mesaj[i]];
      |                                           ^
adfgvx.cpp:49:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   49 |         for(int i=0;i<criptmesaj.size();i++)
      |                     ~^~~~~~~~~~~~~~~~~~
adfgvx.cpp:55:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   55 |             for(int j=0;j<cheie.size();j++)
      |                         ~^~~~~~~~~~~~~
adfgvx.cpp:59:34: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   59 |                     for(int i=0;i<criptmesaj.size()/cheie.size()+1;i++)
      |                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adfgvx.cpp:77:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   77 |             for(int i=0;i<length.size();i++)
      |                         ~^~~~~~~~~~~~~~
adfgvx.cpp:81:34: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   81 |                     for(int k=0;k<a.size();k++)
      |                                 ~^~~~~~~~~
adfgvx.cpp:89:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   89 |             for(int j=0;j<length.size();j++)
      |                         ~^~~~~~~~~~~~~~
adfgvx.cpp:92:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   92 |         for(int j=0;j<decriptmesaj.size();j+=2)
      |                     ~^~~~~~~~~~~~~~~~~~~~

Rezultat evaluare

Test Timp Mesaj evaluare Scor posibil Scor obținut
1 0.001 secunde OK. 5 5 Exemplu
2 0.001 secunde OK. 5 5 Exemplu
3 0.001 secunde OK. 10 10
4 0.001 secunde OK. 10 10
5 0.002 secunde OK. 20 20
6 0.002 secunde OK. 20 20
7 0.001 secunde OK. 10 10
8 0.001 secunde OK. 10 10
9 0.001 secunde OK. 5 5
10 0.001 secunde OK. 5 5
Punctaj total 100

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

Du-te sus!