#526
Preturi
Gigel trebuie să cumpere n
produse, pentru fiecare produs cunoscându-se cantitate necesară. În oraș sunt m
magazine, în fiecare magazin găsindu-se produsele dorite la anumite prețuri. Determinați suma totală minimă necesară pentru a cumpăra produsele dorite, știind că poate cumpăra orice produs din orice magazin.
Problema | Preturi | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49598495 | Utilizator | |
Fișier | preturi.cpp | Dimensiune | 545 B |
Data încărcării | 08 Martie 2024, 14:59 | Scor / rezultat | Eroare de compilare |
preturi.cpp:7:1: error: stray '\302' in program int a[101],p[101],n,m,i,j,pret; ^ preturi.cpp:7:1: error: stray '\240' in program preturi.cpp:7:1: error: stray '\302' in program preturi.cpp:7:1: error: stray '\240' in program preturi.cpp:8:1: error: stray '\302' in program cin>>n; ^ preturi.cpp:8:1: error: stray '\240' in program preturi.cpp:8:1: error: stray '\302' in program preturi.cpp:8:1: error: stray '\240' in program preturi.cpp:9:1: error: stray '\302' in program for(j=1; j<=n; j++) ^ preturi.cpp:9:1: error: stray '\240' in program preturi.cpp:9:1: error: stray '\302' in program preturi.cpp:9:1: error: stray '\240' in program preturi.cpp:10:1: error: stray '\302' in program p[j]=1001; ^ preturi.cpp:10:1: error: stray '\240' in program preturi.cpp:10:1: error: stray '\302' in program preturi.cpp:10:1: error: stray '\240' in program preturi.cpp:10:1: error: stray '\302' in program preturi.cpp:10:1: error: stray '\240' in program preturi.cpp:10:1: error: stray '\302' in program preturi.cpp:10:1: error: stray '\240' in program preturi.cpp:11:1: error: stray '\302' in program for(i=1; i<=n; i++) ^ preturi.cpp:11:1: error: stray '\240' in program preturi.cpp:11:1: error: stray '\302' in program preturi.cpp:11:1: error: stray '\240' in program preturi.cpp:12:1: error: stray '\302' in program cin>>a[i]; ^ preturi.cpp:12:1: error: stray '\240' in program preturi.cpp:12:1: error: stray '\302' in program preturi.cpp:12:1: error: stray '\240' in program preturi.cpp:12:1: error: stray '\302' in program preturi.cpp:12:1: error: stray '\240' in program preturi.cpp:12:1: error: stray '\302' in program preturi.cpp:12:1: error: stray '\240' in program preturi.cpp:13:1: error: stray '\302' in program cin>>m; ^ preturi.cpp:13:1: error: stray '\240' in program preturi.cpp:13:1: error: stray '\302' in program preturi.cpp:13:1: error: stray '\240' in program preturi.cpp:14:1: error: stray '\302' in program for(i=1; i<=m; i++) ^ preturi.cpp:14:1: error: stray '\240' in program preturi.cpp:14:1: error: stray '\302' in program preturi.cpp:14:1: error: stray '\240' in program preturi.cpp:15:1: error: stray '\302' in program for(j=1; j<=n; j++) ^ preturi.cpp:15:1: error: stray '\240' in program preturi.cpp:15:1: error: stray '\302' in program preturi.cpp:15:1: error: stray '\240' in program preturi.cpp:15:1: error: stray '\302' in program preturi.cpp:15:1: error: stray '\240' in program preturi.cpp:15:1: error: stray '\302' in program preturi.cpp:15:1: error: stray '\240' in program preturi.cpp:16:1: error: stray '\302' in program { ^ preturi.cpp:16:1: error: stray '\240' in program preturi.cpp:16:1: error: stray '\302' in program preturi.cpp:16:1: error: stray '\240' in program preturi.cpp:16:1: error: stray '\302' in program preturi.cpp:16:1: error: stray '\240' in program preturi.cpp:16:1: error: stray '\302' in program preturi.cpp:16:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program cin>>pret; ^ preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:17:1: error: stray '\302' in program preturi.cpp:17:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program if(pret<p[j] && pret>0) ^ preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:18:1: error: stray '\302' in program preturi.cpp:18:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program p[j]=pret; ^ preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:19:1: error: stray '\302' in program preturi.cpp:19:1: error: stray '\240' in program preturi.cpp:20:1: error: stray '\302' in program } ^ preturi.cpp:20:1: error: stray '\240' in program preturi.cpp:20:1: error: stray '\302' in program preturi.cpp:20:1: error: stray '\240' in program preturi.cpp:20:1: error: stray '\302' in program preturi.cpp:20:1: error: stray '\240' in program preturi.cpp:20:1: error: stray '\302' in program preturi.cpp:20:1: error: stray '\240' in program preturi.cpp:22:1: error: stray '\302' in program for(i=1; i<=n; i++) ^ preturi.cpp:22:1: error: stray '\240' in program preturi.cpp:22:1: error: stray '\302' in program preturi.cpp:22:1: error: stray '\240' in program preturi.cpp:23:1: error: stray '\302' in program pret= pret+a[i]*p[i]; ^ preturi.cpp:23:1: error: stray '\240' in program preturi.cpp:23:1: error: stray '\302' in program preturi.cpp:23:1: error: stray '\240' in program preturi.cpp:23:1: error: stray '\302' in program preturi.cpp:23:1: error: stray '\240' in program preturi.cpp:23:1: error: stray '\302' in program preturi.cpp:23:1: error: stray '\240' in program preturi.cpp:24:1: error: stray '\302' in program cout<<pret; ^ preturi.cpp:24:1: error: stray '\240' in program preturi.cpp:24:1: error: stray '\302' in program preturi.cpp:24:1: error: stray '\240' in program preturi.cpp:24:1: error: stray '\302' in program preturi.cpp:24:1: error: stray '\240' in program preturi.cpp:24:1: error: stray '\302' in program preturi.cpp:24:1: error: stray '\240' in program preturi.cpp:25:1: error: stray '\302' in program return 0; ^ preturi.cpp:25:1: error: stray '\240' in program preturi.cpp:25:1: error: stray '\302' in program preturi.cpp:25:1: error: stray '\240' in program preturi.cpp:1:1: error: 'include' does not name a type include <iostream> ^ preturi.cpp: In function 'int main()': preturi.cpp:8:7: error: 'cin' was not declared in this scope cin>>n; ^ preturi.cpp:24:13: error: 'cout' was not declared in this scope cout<<pret; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Preturi 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ă.