#521
kSecventa
Se dă un vector cu n
elemente, numere naturale, și un număr k
, divizor al lui n
. Se împarte vectorul în k
secvențe disjuncte, numerotate de la 1
la k
. Să se stabilească dacă există două secvențe identice.
Problema | kSecventa | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55080995 | Utilizator | |
Fișier | ksecventa.cpp | Dimensiune | 1.70 KB |
Data încărcării | 21 Decembrie 2024, 11:18 | Scor / rezultat | Eroare de compilare |
ksecventa.cpp:3:49: error: redefinition of 'long long int L' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:37: error: 'long long int L' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp: In function 'int main()': ksecventa.cpp:5:19: error: 'k' was not declared in this scope cin >> n >> k; ^ ksecventa.cpp:16:7: error: 'ok' was not declared in this scope ok = 1; ^ ksecventa.cpp:18:12: error: 'v' was not declared in this scope if (v[i+p] != v[j+p]) { ^ ksecventa.cpp: At global scope: ksecventa.cpp:34:11: error: redefinition of 'long long int n' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:11: error: 'long long int n' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:20: error: redefinition of 'long long int a [1001]' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:14: error: 'long long int a [1001]' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:22: error: redefinition of 'long long int maxi' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:22: error: 'long long int maxi' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:27: error: redefinition of 'long long int dr' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:27: error: 'long long int dr' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:30: error: redefinition of 'long long int st' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:30: error: 'long long int st' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:33: error: redefinition of 'long long int st1' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:33: error: 'long long int st1' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:37: error: redefinition of 'long long int L' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:37: error: 'long long int L' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:40: error: redefinition of 'long long int dim' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:40: error: 'long long int dim' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:45: error: redefinition of 'long long int i' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:45: error: 'long long int i' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:47: error: redefinition of 'long long int j' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:47: error: 'long long int j' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:49: error: redefinition of 'long long int L' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:37: error: 'long long int L' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:51: error: redefinition of 'long long int m' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:51: error: 'long long int m' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:34:53: error: redefinition of 'long long int p' long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp:3:53: error: 'long long int p' previously declared here long long n, a[1001],maxi,dr,st,st1,L, dim, i,j,L,m,p; ^ ksecventa.cpp: In function 'int main()': ksecventa.cpp:35:5: error: redefinition of 'int main()' int main () { ^ ksecventa.cpp:4:5: error: 'int main()' previously defined here int main () { ^ ksecventa.cpp:36:19: error: 'k' was not declared in this scope cin >> n >> k; ^ ksecventa.cpp:47:7: error: 'ok' was not declared in this scope ok = 1; ^ ksecventa.cpp:49:12: error: 'v' was not declared in this scope if (v[i+p] != v[j+p]) { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema kSecventa 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ă.