#1839
Memory006
Se dă un şir de numere naturale nenule. Să se afle numărul secvenţelor din şir care au produsul elementelor egal cu 2
k
, unde k
este un număr dat.
Problema | Memory006 | Operații I/O |
memory006.in /memory006.out
|
---|---|---|---|
Limita timp | 0.16 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
Id soluție | #50430970 | Utilizator | |
Fișier | memory006.cpp | Dimensiune | 1.23 KB |
Data încărcării | 09 Aprilie 2024, 12:36 | Scor / rezultat | Eroare de compilare |
memory006.cpp:9:1: error: expected ',' or ';' before 'long' long long p2[60],x,n,k,st,dr=-1,sum,nrs; ^ memory006.cpp: In function 'int cb()': memory006.cpp:18:12: error: 'p2' was not declared in this scope if(p2[mij]==x) ^ memory006.cpp:18:21: error: 'x' was not declared in this scope if(p2[mij]==x) ^ memory006.cpp:20:12: error: 'p2' was not declared in this scope if(p2[mij]<x) ^ memory006.cpp:20:20: error: 'x' was not declared in this scope if(p2[mij]<x) ^ memory006.cpp: In function 'int main()': memory006.cpp:29:5: error: 'p2' was not declared in this scope p2[1]=2; ^ memory006.cpp:32:10: error: 'n' was not declared in this scope cin>>n>>k; ^ memory006.cpp:32:13: error: 'k' was not declared in this scope cin>>n>>k; ^ memory006.cpp:35:14: error: 'x' was not declared in this scope cin>>x; ^ memory006.cpp:36:9: error: 'e' was not declared in this scope e=cb();///e=poz pe care se gaseste x in vector ^ memory006.cpp:39:15: error: 'sum' was not declared in this scope sum=0; ^ memory006.cpp:40:15: error: 'st' was not declared in this scope st=0; ^ memory006.cpp:41:15: error: 'dr' was not declared in this scope dr=-1; ^ memory006.cpp:45:13: error: 'dr' was not declared in this scope dr=(dr+1)%M; ^ memory006.cpp:47:13: error: 'sum' was not declared in this scope sum=sum+e; ^ memory006.cpp:51:20: error: 'nrs' was not declared in this scope nrs++; ^ memory006.cpp:56:32: error: 'st' was not declared in this scope sum-=v[st]; ^ memory006.cpp:60:23: error: 'nrs' was not declared in this scope nrs++; ^ memory006.cpp:65:11: error: 'nrs' was not declared in this scope cout<<nrs; ^ memory006.cpp: In function 'int cb()': memory006.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory006 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ă.