#522
kSecventa1
Se dă un vector cu n
elemente, numere naturale, și un număr k
. Să se stabilească dacă în vector există două secvențe de lungime k
identice.
Problema | kSecventa1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23553139 | Utilizator | |
Fișier | ksecventa1.cpp | Dimensiune | 484 B |
Data încărcării | 26 Iulie 2020, 11:50 | Scor / rezultat | Eroare de compilare |
ksecventa1.cpp:4:1: error: stray '\302' in program int a[1001],n,k; ^ ksecventa1.cpp:4:1: error: stray '\240' in program ksecventa1.cpp:5:1: error: stray '\302' in program int Begin,End,ok=0; ^ ksecventa1.cpp:5:1: error: stray '\240' in program ksecventa1.cpp:6:1: error: stray '\302' in program int main() ^ ksecventa1.cpp:6:1: error: stray '\240' in program ksecventa1.cpp:8:1: error: stray '\302' in program cin >> n >> k; ^ ksecventa1.cpp:8:1: error: stray '\240' in program ksecventa1.cpp:8:1: error: stray '\302' in program ksecventa1.cpp:8:1: error: stray '\240' in program ksecventa1.cpp:8:1: error: stray '\302' in program ksecventa1.cpp:8:1: error: stray '\240' in program ksecventa1.cpp:8:1: error: stray '\302' in program ksecventa1.cpp:8:1: error: stray '\240' in program ksecventa1.cpp:9:1: error: stray '\302' in program for(int i=1;i<=n;i++) ^ ksecventa1.cpp:9:1: error: stray '\240' in program ksecventa1.cpp:10:1: error: stray '\302' in program cin >> a[i]; ^ ksecventa1.cpp:10:1: error: stray '\240' in program ksecventa1.cpp:10:1: error: stray '\302' in program ksecventa1.cpp:10:1: error: stray '\240' in program ksecventa1.cpp:11:1: error: stray '\302' in program for(int i=1;i<n-k and !ok;i++) ^ ksecventa1.cpp:11:1: error: stray '\240' in program ksecventa1.cpp:11:1: error: stray '\302' in program ksecventa1.cpp:11:1: error: stray '\240' in program ksecventa1.cpp:11:1: error: stray '\302' in program ksecventa1.cpp:11:1: error: stray '\240' in program ksecventa1.cpp:13:1: error: stray '\302' in program for(int j=i+1;j<=n-k+1 and !ok;j++) ^ ksecventa1.cpp:13:1: error: stray '\240' in program ksecventa1.cpp:13:1: error: stray '\302' in program ksecventa1.cpp:13:1: error: stray '\240' in program ksecventa1.cpp:13:1: error: stray '\302' in program ksecventa1.cpp:13:1: error: stray '\240' in program ksecventa1.cpp:15:1: error: stray '\302' in program int ii=i,jj=j,nr=0; ^ ksecventa1.cpp:15:1: error: stray '\240' in program ksecventa1.cpp:16:1: error: stray '\302' in program while(a[ii]==a[jj] and nr < k) ^ ksecventa1.cpp:16:1: error: stray '\240' in program ksecventa1.cpp:16:1: error: stray '\302' in program ksecventa1.cpp:16:1: error: stray '\240' in program ksecventa1.cpp:16:1: error: stray '\302' in program ksecventa1.cpp:16:1: error: stray '\240' in program ksecventa1.cpp:16:1: error: stray '\302' in program ksecventa1.cpp:16:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program if(ok) cout << Begin << " " << End; ^ ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:30:1: error: stray '\302' in program ksecventa1.cpp:30:1: error: stray '\240' in program ksecventa1.cpp:31:1: error: stray '\302' in program else cout << "NU"; ^ ksecventa1.cpp:31:1: error: stray '\240' in program ksecventa1.cpp:31:1: error: stray '\302' in program ksecventa1.cpp:31:1: error: stray '\240' in program ksecventa1.cpp:31:1: error: stray '\302' in program ksecventa1.cpp:31:1: error: stray '\240' in program ksecventa1.cpp:32:1: error: stray '\302' in program return 0; ^ ksecventa1.cpp:32:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema kSecventa1 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ă.