Detalii evaluare #64125306

Rezumat problemă

#3616

Cifrul ADFGX este un cifru care folosește o matrice pătratică 5x5 și o cheie. În matricea pătratică, liniile și coloanele vor fi numerotate cu litere. Avem această matrice ca exemplu.

  A D F G X
A a b c d e
D f g h i j
F k l m n o
G p q r s t
X u v w x y

Detalii

Problema adfgx Operații I/O adfgx.in/adfgx.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64125306 Utilizator Mari Cristian (MariCristian)
Fișier adfgx.cpp Dimensiune 3.43 KB
Data încărcării 18 Aprilie 2026, 22:06 Scor/rezultat 30 puncte

Evaluare

Mesaj compilare

adfgx.cpp: In function ‘int main()’:
adfgx.cpp:46:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   46 |     for(int i=0; i<strlen(cheie)-1; i++)
      |                  ~^~~~~~~~~~~~~~~~
adfgx.cpp:47:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   47 |         for(int j=i+1; j<strlen(cheie); j++)
      |                        ~^~~~~~~~~~~~~~
adfgx.cpp:54:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   54 |         for(int i=0; i<strlen(mesaj); i++)
      |                      ~^~~~~~~~~~~~~~
adfgx.cpp:58:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   58 |                     {   if(pj>=strlen(cheie))
      |                            ~~^~~~~~~~~~~~~~~
adfgx.cpp:64:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   64 |                         if(pj>=strlen(cheie))
      |                            ~~^~~~~~~~~~~~~~~
adfgx.cpp:71:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   71 |         for(int i=0; i<strlen(cheie)-1; i++)
      |                      ~^~~~~~~~~~~~~~~~
adfgx.cpp:72:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   72 |             for(int j=i+1; j<strlen(cheie); j++)
      |                            ~^~~~~~~~~~~~~~
adfgx.cpp:78:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   78 |         for(int j=0; j<strlen(cheie); j++)
      |                      ~^~~~~~~~~~~~~~
adfgx.cpp:89:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   89 |         for(int i=0; i<strlen(mesaj); i++)
      |                      ~^~~~~~~~~~~~~~
adfgx.cpp:98:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   98 |             for(int j=0; j<strlen(cheie); j++)
      |                          ~^~~~~~~~~~~~~~
adfgx.cpp:109:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  109 |                         if(codare[k]==b)
      |                         ^~
adfgx.cpp:111:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  111 |                             if(a&&b)
      |                             ^~
adfgx.cpp:86:14: warning: unused variable ‘decod’ [-Wunused-variable]
   86 |         char decod[1000],a,b;
      |              ^~~~~

Rezultat evaluare

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

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 adfgx 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!