#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 | #64829321 | Utilizator | |
| Fișier | produs.cpp | Dimensiune | 310 B |
| Data încărcării | 04 Iunie 2026, 10:40 | Scor/rezultat | Eroare de compilare |
produs.cpp: In function ‘int main()’: produs.cpp:12:42: error: ‘x’ was not declared in this scope 12 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)fv[x]++; if(fv[x]!=2) nr++;} | ^ produs.cpp:12:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)fv[x]++; if(fv[x]!=2) nr++;} | ^~~ produs.cpp:12:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)fv[x]++; if(fv[x]!=2) nr++;} | ^~ produs.cpp:12:54: error: ‘x’ was not declared in this scope 12 | for(j=1;j<=m;j++) if(v[i]*s[j]<p)fv[x]++; if(fv[x]!=2) nr++;} | ^
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ă.