#520
Secventa2
Se dă un vector x
cu n
elemente, numere naturale și un vector y
cu m
elemente, numere naturale. Să se determine de câte ori este vectorul y
secvență în vectorul x
.
Problema | Secventa2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23212297 | Utilizator | |
Fișier | secventa2.c | Dimensiune | 653 B |
Data încărcării | 01 Iunie 2020, 14:35 | Scor / rezultat | 100 puncte |
secventa2.c: In function 'main': secventa2.c:7:5: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long unsigned int *' [-Wformat=] scanf("%d",&n); ^ secventa2.c:9:9: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long unsigned int *' [-Wformat=] scanf("%d",&x[i]); ^ secventa2.c:10:5: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long unsigned int *' [-Wformat=] scanf("%d",&m); ^ secventa2.c:12:9: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long unsigned int *' [-Wformat=] scanf("%d",&y[j]); ^ secventa2.c:27:1: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long unsigned int' [-Wformat=] printf("%d", c); ^ secventa2.c:7:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ secventa2.c:9:14: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&x[i]); ^ secventa2.c:10:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&m); ^ secventa2.c:12:14: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&y[j]); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | OK. | 20 | 20 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Secventa2 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ă.