#519
Se dă un vector x cu n elemente, numere naturale, și un vector y cu m elemente, numere naturale. Să se verifice dacă vectorul y este secvență în vectorul x.
| Problema | Secventa1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64274605 | Utilizator | |
| Fișier | secventa1.cpp | Dimensiune | 504 B |
| Data încărcării | 27 Aprilie 2026, 15:19 | Scor/rezultat | Eroare de compilare |
secventa1.cpp: In function ‘int main()’: secventa1.cpp:5:5: error: ‘cin’ was not declared in this scope 5 | cin>>n; | ^~~ secventa1.cpp:6:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 6 | for(i=1;i<=n;i++) | ^~~ secventa1.cpp:8:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 8 | cin>>m; | ^~~ secventa1.cpp:9:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(j=1;j<=m;j++) | ^~~ secventa1.cpp:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | ok=1; | ^~ secventa1.cpp:16:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(j=1;j<=m;j++) | ^~~ secventa1.cpp:19:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | ok=0; | ^~ secventa1.cpp:24:9: error: ‘cout’ was not declared in this scope 24 | cout<<i-1; | ^~~~ secventa1.cpp:26:9: error: ‘cout’ was not declared in this scope 26 | cout<<"NU"; | ^~~~ secventa1.cpp:25:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 25 | else | ^~~~ secventa1.cpp:27:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 27 | return 0; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Secventa1 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ă.