#519
Secventa1
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 | #8618700 | Utilizator | |
Fișier | secventa1.cpp | Dimensiune | 367 B |
Data încărcării | 03 Martie 2018, 23:34 | Scor / rezultat | Eroare de compilare |
secventa1.cpp:7:1: error: stray '\302' in program cin>>x[i]; ^ secventa1.cpp:7:1: error: stray '\240' in program secventa1.cpp:9:1: error: stray '\302' in program cin>>y[i]; ^ secventa1.cpp:9:1: error: stray '\240' in program secventa1.cpp:11:1: error: stray '\302' in program cout<<"NU"; ^ secventa1.cpp:11:1: error: stray '\240' in program secventa1.cpp:14:1: error: stray '\302' in program {ok=0; ^ secventa1.cpp:14:1: error: stray '\240' in program secventa1.cpp:16:1: error: stray '\302' in program if(x[i]!=y[i]) ^ secventa1.cpp:16:1: error: stray '\240' in program secventa1.cpp:16:1: error: stray '\302' in program secventa1.cpp:16:1: error: stray '\240' in program secventa1.cpp:17:1: error: stray '\302' in program {ok=1; ^ secventa1.cpp:17:1: error: stray '\240' in program secventa1.cpp:17:1: error: stray '\302' in program secventa1.cpp:17:1: error: stray '\240' in program secventa1.cpp:17:1: error: stray '\302' in program secventa1.cpp:17:1: error: stray '\240' in program secventa1.cpp:18:1: error: stray '\302' in program k++; ^ secventa1.cpp:18:1: error: stray '\240' in program secventa1.cpp:21:1: error: stray '\302' in program ^ secventa1.cpp:21:1: error: stray '\240' in program secventa1.cpp:21:1: error: stray '\302' in program secventa1.cpp:21:1: error: stray '\240' in program secventa1.cpp:21:1: error: stray '\302' in program secventa1.cpp:21:1: error: stray '\240' in program secventa1.cpp:21:1: error: stray '\302' in program secventa1.cpp:21:1: error: stray '\240' in program secventa1.cpp:22:1: error: stray '\302' in program } ^ secventa1.cpp:22:1: error: stray '\240' in program secventa1.cpp:25:1: error: stray '\302' in program cout<<"DA"; ^ secventa1.cpp:25:1: error: stray '\240' in program secventa1.cpp:4:2: error: expected primary-expression before 'int' {int i,n,m,y[100],x[100],k=1,ok=0; ^ secventa1.cpp:4:2: error: expected '}' before 'int' secventa1.cpp:4:2: error: expected ',' or ';' before 'int' secventa1.cpp:5:1: error: 'cin' does not name a type cin>>n>>m; ^ secventa1.cpp:6:1: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ secventa1.cpp:6:9: error: 'i' does not name a type for(i=1;i<=n;i++) ^ secventa1.cpp:6:14: error: 'i' does not name a type for(i=1;i<=n;i++) ^ secventa1.cpp:8:1: error: expected unqualified-id before 'for' for(i=1;i<=m;i++) ^ secventa1.cpp:8:9: error: 'i' does not name a type for(i=1;i<=m;i++) ^ secventa1.cpp:8:14: error: 'i' does not name a type for(i=1;i<=m;i++) ^ secventa1.cpp:10:1: error: expected unqualified-id before 'if' if(n<=m) ^ secventa1.cpp:12:1: error: expected unqualified-id before 'else' else ^
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ă.