#1010
Se dau două șiruri cu câte n, respectiv m elemente. Dacă înmulțim fiecare element din primul șir cu fiecare element din al doilea șir, să se afle câte produse sunt mai mici decât p.
| Problema | produs | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 1 MB
|
| Id soluție | #64829504 | Utilizator | |
| Fișier | produs.cpp | Dimensiune | 335 B |
| Data încărcării | 04 Iunie 2026, 10:44 | Scor/rezultat | Eroare de compilare |
produs.cpp: In function ‘int main()’: produs.cpp:5:13: error: ‘x’ was not declared in this scope 5 | {while(cin>>x&&x>=1) fv[x]++; | ^ produs.cpp:13:42: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 13 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)if(fv[x]<=2 nr++;} | ^~ produs.cpp:13:45: error: ‘x’ was not declared in this scope 13 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)if(fv[x]<=2 nr++;} | ^ produs.cpp:13:56: error: expected primary-expression before ‘}’ token 13 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)if(fv[x]<=2 nr++;} | ^ produs.cpp:13:56: error: expected ‘)’ before ‘}’ token 13 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)if(fv[x]<=2 nr++;} | ~ ^ | ) produs.cpp:13:56: error: expected primary-expression before ‘}’ token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema produs 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ă.