Detalii evaluare #30348594

Rezumat problemă

#3808 ADFGVX

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 #30348594 Utilizator ✔️ Popa Adrian (a53)
Fișier adfgvx.cpp Dimensiune 2.81 KB
Data încărcării 21 Iulie 2021, 06:21 Scor / rezultat 100 puncte

Evaluare


Mesaj compilare

adfgvx.cpp: In function 'int main()':
adfgvx.cpp:18:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="A";

                             ^
adfgvx.cpp:20:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="D";

                             ^
adfgvx.cpp:22:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="F";

                             ^
adfgvx.cpp:24:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="G";

                             ^
adfgvx.cpp:26:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="V";

                             ^
adfgvx.cpp:28:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="X";

                             ^
adfgvx.cpp:30:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="A";

                             ^
adfgvx.cpp:32:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="D";

                             ^
adfgvx.cpp:34:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="F";

                             ^
adfgvx.cpp:36:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="G";

                             ^
adfgvx.cpp:38:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="V";

                             ^
adfgvx.cpp:40:29: warning: array subscript has type 'char' [-Wchar-subscripts]
                 character[ch]+="X";

                             ^
adfgvx.cpp:41:36: warning: array subscript has type 'char' [-Wchar-subscripts]
             string cuv=character[ch];

                                    ^
adfgvx.cpp:47:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0;i<mesaj.size();i++)

                                  ^
adfgvx.cpp:48:43: warning: array subscript has type 'char' [-Wchar-subscripts]
             criptmesaj+=character[mesaj[i]];

                                           ^
adfgvx.cpp:49:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0;i<criptmesaj.size();i++)

                                       ^
adfgvx.cpp:55:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=0;j<cheie.size();j++)

                                      ^
adfgvx.cpp:59:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     for(int i=0;i<criptmesaj.size()/cheie.size()+1;i++)

                                                                  ^
adfgvx.cpp:77:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int i=0;i<length.size();i++)

                                       ^
adfgvx.cpp:81:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     for(int k=0;k<a.size();k++)

                                          ^
adfgvx.cpp:89:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=0;j<length.size();j++)

                                       ^
adfgvx.cpp:92:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0;j<decriptmesaj.size();j+=2)

                                         ^

Rezultat evaluare

Test Timp Mesaj evaluare Scor posibil Scor obținut
1 0 secunde OK. 5 5 Exemplu
2 0 secunde OK. 5 5 Exemplu
3 0 secunde OK. 10 10
4 0 secunde OK. 10 10
5 0 secunde OK. 20 20
6 0 secunde OK. 20 20
7 0 secunde OK. 10 10
8 0 secunde OK. 10 10
9 0 secunde OK. 5 5
10 0 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ă.