#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
| 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 | #64534112 | Utilizator | |
| Fișier | adfgx.cpp | Dimensiune | 3.59 KB |
| Data încărcării | 12 Mai 2026, 22:11 | Scor/rezultat | 100 puncte |
adfgx.cpp: In function ‘int main()’: adfgx.cpp:39:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound depends on the length of the source argument [-Wstringop-truncation] 39 | strncpy(sortedKey, key, n + 1); | ^ adfgx.cpp:34:22: note: length computed here 34 | int n = strlen(key); | ~~~~~~^~~~~ adfgx.cpp:39:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound depends on the length of the source argument [-Wstringop-truncation] 39 | strncpy(sortedKey, key, n + 1); | ^ adfgx.cpp:34:22: note: length computed here 34 | int n = strlen(key); | ~~~~~~^~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.003 secunde | OK. | 10 | 10 | ||
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.016 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.002 secunde | OK. | 10 | 10 | ||
| 9 | 0.006 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema adfgx face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.