Detalii evaluare #54414127

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 #54414127 Utilizator Pintea Pavel (PavelCod)
Fișier adfgvx.cpp Dimensiune 7.38 KB
Data încărcării 27 Noiembrie 2024, 21:34 Scor / rezultat 15 puncte

Evaluare


Mesaj compilare

adfgvx.cpp: In function 'int main()':
adfgvx.cpp:30:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0; i<strlen(mesaj); i++)

                                    ^
adfgvx.cpp:75:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<=(strlen(mesaj)/strlen(cheie))*2+1; i++)

                                                         ^
adfgvx.cpp:77:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=1; j<=strlen(cheie); j++)

                                         ^
adfgvx.cpp:80:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if(j+1<=strlen(cheie))

                                     ^
adfgvx.cpp:98:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<=strlen(vecsup); i++)

                                      ^
adfgvx.cpp:100:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=i+1; j<strlen(vecsup); j++)

                                           ^
adfgvx.cpp:107:69: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     for(int k=1; k<=(strlen(mesaj)/strlen(cheie))*2+1; k++)

                                                                     ^
adfgvx.cpp:127:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=1; j<=strlen(cheie); j++)

                                     ^
adfgvx.cpp:129:61: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int i=1; i<=(strlen(mesaj)/strlen(cheie))*2+1; i++)

                                                             ^
adfgvx.cpp:138:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(j<strlen(cheie))out<<" ";

                              ^
adfgvx.cpp:159:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0; i<=strlen(cheie)/2; i++)

                                       ^
adfgvx.cpp:169:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0; i<=strlen(vecmescheie); i++)

                                           ^
adfgvx.cpp:174:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0; i<strlen(vecmescheie); i++)

                                          ^
adfgvx.cpp:182:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<strlen(cheie); i++)

                                    ^
adfgvx.cpp:196:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<strlen(cheie); i++)

                                    ^
adfgvx.cpp:200:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<strlen(cheie); i++)

                                    ^
adfgvx.cpp:202:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=i; j<strlen(cheie); j++)

                                        ^
adfgvx.cpp:210:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<strlen(cheie); i++)

                                    ^
adfgvx.cpp:214:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<=strlen(cheie); i++)

                                     ^
adfgvx.cpp:216:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=1; j<strlen(cheie); j++)

                                        ^
adfgvx.cpp:233:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j=1; j<strlen(cheie); j++)

                                        ^
adfgvx.cpp:252:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=1; i<=strlen(vecmescheie)*2; i+=2)

                                             ^
adfgvx.cpp:39:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:45:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:51:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:57:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:63:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:69:25: warning: array subscript is above array bounds [-Warray-bounds]
                     cl[2][i+1]=j+1;

                         ^
adfgvx.cpp:83:37: warning: array subscript is above array bounds [-Warray-bounds]
                     fin[i][j+1]=cl[2][k];

                                     ^
adfgvx.cpp:90:37: warning: array subscript is above array bounds [-Warray-bounds]
                     fin[i+1][1]=cl[2][k];

                                     ^
adfgvx.cpp:212:22: warning: array subscript is above array bounds [-Warray-bounds]
             pozitii[2][i]=(int)cheie[i];

                      ^
adfgvx.cpp:218:44: warning: array subscript is above array bounds [-Warray-bounds]
                 if(pozitii[1][i]==pozitii[2][j])

                                            ^
adfgvx.cpp:220:35: warning: array subscript is above array bounds [-Warray-bounds]
                     swap(pozitii[2][i], pozitii[2][j]);

                                   ^
adfgvx.cpp:220:35: warning: array subscript is above array bounds [-Warray-bounds]
adfgvx.cpp:220:50: warning: array subscript is above array bounds [-Warray-bounds]
                     swap(pozitii[2][i], pozitii[2][j]);

                                                  ^
adfgvx.cpp:168:13: warning: 'nrrand' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int nrrand;

             ^

Rezultat evaluare

Test Timp Mesaj evaluare Scor posibil Scor obținut
1 0 secunde Raspuns gresit. 5 0 Exemplu
2 0 secunde OK. 5 5 Exemplu
3 0 secunde Raspuns gresit. 10 0
4 0 secunde Raspuns gresit. 10 0
5 0.004 secunde Raspuns gresit. 20 0
6 Depășit Limita de timp depășită 20 0
7 0 secunde Raspuns gresit. 10 0
8 0 secunde OK. 10 10
9 0 secunde Raspuns gresit. 5 0
10 0 secunde Raspuns gresit. 5 0
Punctaj total 15

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