#3942
fazan
Se dau n
cuvinte formate din litere mici și un număr m
. Afișați în ordine lexicografică toate șirurile de m cuvinte dintre cele date, care respectă regula jocului Fazan
.
Problema | fazan | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49766526 | Utilizator | |
Fișier | fazan.cpp | Dimensiune | 910 B |
Data încărcării | 14 Martie 2024, 12:02 | Scor / rezultat | 30 puncte |
fazan.cpp: In function 'int valid(int)': fazan.cpp:10:28: warning: array subscript has type 'char' [-Wchar-subscripts] int l1=strlen(a[st[k-1]]); ^ fazan.cpp:14:21: warning: array subscript has type 'char' [-Wchar-subscripts] if(a[st[k-1]][l1-2]==a[st[k]][0] && a[st[k-1]][l1-1]==a[st[k]][1]) ^ fazan.cpp:14:37: warning: array subscript has type 'char' [-Wchar-subscripts] if(a[st[k-1]][l1-2]==a[st[k]][0] && a[st[k-1]][l1-1]==a[st[k]][1]) ^ fazan.cpp:14:54: warning: array subscript has type 'char' [-Wchar-subscripts] if(a[st[k-1]][l1-2]==a[st[k]][0] && a[st[k-1]][l1-1]==a[st[k]][1]) ^ fazan.cpp:14:70: warning: array subscript has type 'char' [-Wchar-subscripts] if(a[st[k-1]][l1-2]==a[st[k]][0] && a[st[k-1]][l1-1]==a[st[k]][1]) ^ fazan.cpp:13:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(k>1) ^ fazan.cpp: In function 'void afisare(int)': fazan.cpp:22:22: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<a[st[i]]<<" "; ^ fazan.cpp: In function 'void Back(int)': fazan.cpp:30:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) ^ fazan.cpp: In function 'int valid(int)': fazan.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | OK. | 10 | 10 | Exemplu | |
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0.004 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0.048 secunde | Raspuns gresit. | 10 | 0 | ||
10 | Depășit | Limita de timp depășită | 5 | 0 | ||
11 | Depășit | Limita de timp depășită | 5 | 0 | ||
Punctaj total | 30 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema fazan 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ă.