#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51687951 | Utilizator | |
Fișier | ksecventa1.cpp | Dimensiune | 680 B |
Data încărcării | 03 August 2024, 13:12 | Scor / rezultat | 100 puncte |
ksecventa1.cpp: In function 'int main()': ksecventa1.cpp:4:20: warning: unused variable 'y' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:37: warning: unused variable 't' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:40: warning: unused variable 'nrc' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:47: warning: unused variable 'ma' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:54: warning: unused variable 's' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:59: warning: unused variable 'm' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:62: warning: unused variable 'aux' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:71: warning: unused variable 'max' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:83: warning: unused variable 'sum' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:102: warning: unused variable 'drmax' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:111: warning: unused variable 'stmax' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:120: warning: unused variable 'a' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ ksecventa1.cpp:4:123: warning: unused variable 'b' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | ||
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 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ă.