#2245
Plata1
Se consideră n
tipuri de bancnote, cu valorile v[1] v[2] ... v[n]
, ordonate strict crescător. Pentru fiecare tip de bancnote se știe numărul de bancnote disponibile c[1] c[2] ... c[n]
. Se cere să se determine o modalitate de a plăti integral o sumă dată S
cu bancnotele disponibile.
Problema | Plata1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53684780 | Utilizator | |
Fișier | plata1.cpp | Dimensiune | 1.01 KB |
Data încărcării | 08 Noiembrie 2024, 11:56 | Scor / rezultat | Eroare de compilare |
plata1.cpp:7:1: error: stray '\302' in program cin >>n>>s; ^ plata1.cpp:7:1: error: stray '\240' in program plata1.cpp:7:1: error: stray '\302' in program plata1.cpp:7:1: error: stray '\240' in program plata1.cpp:8:1: error: stray '\302' in program for (int i =1 ; i<=n; i++) ^ plata1.cpp:8:1: error: stray '\240' in program plata1.cpp:8:1: error: stray '\302' in program plata1.cpp:8:1: error: stray '\240' in program plata1.cpp:9:1: error: stray '\302' in program cin>>v[i]; ^ plata1.cpp:9:1: error: stray '\240' in program plata1.cpp:9:1: error: stray '\302' in program plata1.cpp:9:1: error: stray '\240' in program plata1.cpp:9:1: error: stray '\302' in program plata1.cpp:9:1: error: stray '\240' in program plata1.cpp:9:1: error: stray '\302' in program plata1.cpp:9:1: error: stray '\240' in program plata1.cpp:10:1: error: stray '\302' in program for (int i =1 ; i<=n; i++) ^ plata1.cpp:10:1: error: stray '\240' in program plata1.cpp:10:1: error: stray '\302' in program plata1.cpp:10:1: error: stray '\240' in program plata1.cpp:11:1: error: stray '\302' in program cin>>c[i]; ^ plata1.cpp:11:1: error: stray '\240' in program plata1.cpp:11:1: error: stray '\302' in program plata1.cpp:11:1: error: stray '\240' in program plata1.cpp:11:1: error: stray '\302' in program plata1.cpp:11:1: error: stray '\240' in program plata1.cpp:11:1: error: stray '\302' in program plata1.cpp:11:1: error: stray '\240' in program plata1.cpp:12:1: error: stray '\302' in program int z=n;//Incepe pargurea de la ultima bancnota, cea mai mare . ^ plata1.cpp:12:1: error: stray '\240' in program plata1.cpp:12:1: error: stray '\302' in program plata1.cpp:12:1: error: stray '\240' in program plata1.cpp:13:1: error: stray '\302' in program int suma=0,sumaorg=s; ^ plata1.cpp:13:1: error: stray '\240' in program plata1.cpp:13:1: error: stray '\302' in program plata1.cpp:13:1: error: stray '\240' in program plata1.cpp:14:1: error: stray '\302' in program while (z>=1) //Cat timp mai sunt tipuri de bancnote. ^ plata1.cpp:14:1: error: stray '\240' in program plata1.cpp:14:1: error: stray '\302' in program plata1.cpp:14:1: error: stray '\240' in program plata1.cpp:15:1: error: stray '\302' in program { ^ plata1.cpp:15:1: error: stray '\240' in program plata1.cpp:15:1: error: stray '\302' in program plata1.cpp:15:1: error: stray '\240' in program plata1.cpp:16:1: error: stray '\302' in program while (c[z]>0) // Cat timp mai sunt bancnote de tipul curent. ^ plata1.cpp:16:1: error: stray '\240' in program plata1.cpp:16:1: error: stray '\302' in program plata1.cpp:16:1: error: stray '\240' in program plata1.cpp:16:1: error: stray '\302' in program plata1.cpp:16:1: error: stray '\240' in program plata1.cpp:16:1: error: stray '\302' in program plata1.cpp:16:1: error: stray '\240' in program plata1.cpp:17:1: error: stray '\302' in program { ^ plata1.cpp:17:1: error: stray '\240' in program plata1.cpp:17:1: error: stray '\302' in program plata1.cpp:17:1: error: stray '\240' in program plata1.cpp:17:1: error: stray '\302' in program plata1.cpp:17:1: error: stray '\240' in program plata1.cpp:17:1: error: stray '\302' in program plata1.cpp:17:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program if (v[z]<=s)// Daca bancnota poate fi utilizata ^ plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:18:1: error: stray '\302' in program plata1.cpp:18:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program { ^ plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:19:1: error: stray '\302' in program plata1.cpp:19:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program suma = suma +v[z]; // o foloseste ^ plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:20:1: error: stray '\302' in program plata1.cpp:20:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program s=s-v[z];//suma de plata scade ^ plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:21:1: error: stray '\302' in program plata1.cpp:21:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program vf[z]=vf[z]+1; // numarul de bancnote folosite creste ^ plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:22:1: error: stray '\302' in program plata1.cpp:22:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program } ^ plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:23:1: error: stray '\302' in program plata1.cpp:23:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program c[z]--; // numarul de bancnote disponibile scade ^ plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:24:1: error: stray '\302' in program plata1.cpp:24:1: error: stray '\240' in program plata1.cpp:25:1: error: stray '\302' in program } ^ plata1.cpp:25:1: error: stray '\240' in program plata1.cpp:25:1: error: stray '\302' in program plata1.cpp:25:1: error: stray '\240' in program plata1.cpp:25:1: error: stray '\302' in program plata1.cpp:25:1: error: stray '\240' in program plata1.cpp:25:1: error: stray '\302' in program plata1.cpp:25:1: error: stray '\240' in program plata1.cpp:26:1: error: stray '\302' in program z--; ^ plata1.cpp:26:1: error: stray '\240' in program plata1.cpp:26:1: error: stray '\302' in program plata1.cpp:26:1: error: stray '\240' in program plata1.cpp:26:1: error: stray '\302' in program plata1.cpp:26:1: error: stray '\240' in program plata1.cpp:26:1: error: stray '\302' in program plata1.cpp:26:1: error: stray '\240' in program plata1.cpp:27:1: error: stray '\302' in program } ^ plata1.cpp:27:1: error: stray '\240' in program plata1.cpp:27:1: error: stray '\302' in program plata1.cpp:27:1: error: stray '\240' in program plata1.cpp:28:1: error: stray '\302' in program if (sumaorg==suma) ^ plata1.cpp:28:1: error: stray '\240' in program plata1.cpp:28:1: error: stray '\302' in program plata1.cpp:28:1: error: stray '\240' in program plata1.cpp:29:1: error: stray '\302' in program for (int i=1; i<=n; i++) ^ plata1.cpp:29:1: error: stray '\240' in program plata1.cpp:29:1: error: stray '\302' in program plata1.cpp:29:1: error: stray '\240' in program plata1.cpp:29:1: error: stray '\302' in program plata1.cpp:29:1: error: stray '\240' in program plata1.cpp:29:1: error: stray '\302' in program plata1.cpp:29:1: error: stray '\240' in program plata1.cpp:30:1: error: stray '\302' in program { ^ plata1.cpp:30:1: error: stray '\240' in program plata1.cpp:30:1: error: stray '\302' in program plata1.cpp:30:1: error: stray '\240' in program plata1.cpp:30:1: error: stray '\302' in program plata1.cpp:30:1: error: stray '\240' in program plata1.cpp:30:1: error: stray '\302' in program plata1.cpp:30:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program cout<<vf[i]<<' '; ^ plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:31:1: error: stray '\302' in program plata1.cpp:31:1: error: stray '\240' in program plata1.cpp:32:1: error: stray '\302' in program } ^ plata1.cpp:32:1: error: stray '\240' in program plata1.cpp:32:1: error: stray '\302' in program plata1.cpp:32:1: error: stray '\240' in program plata1.cpp:32:1: error: stray '\302' in program plata1.cpp:32:1: error: stray '\240' in program plata1.cpp:32:1: error: stray '\302' in program plata1.cpp:32:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Plata1 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ă.