#3170
Plata3
Se consideră n
tipuri de bancnote, cu valorile v[1] v[2] ... v[n]
, ordonate strict crescător. Se cere să se determine o modalitate de a plăti integral o sumă dată S
cu bancnotele disponibile, știind că se pot folosi oricâte bancnote de orice tip.
Problema | Plata3 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29889427 | Utilizator | |
Fișier | plata3.cpp | Dimensiune | 1.86 KB |
Data încărcării | 28 Mai 2021, 10:30 | Scor / rezultat | Eroare de compilare |
plata3.cpp:53:2: error: stray '#' in program {#include<iostream> ^ plata3.cpp: In function 'int main()': plata3.cpp:53:3: error: 'include' was not declared in this scope {#include<iostream> ^ plata3.cpp:53:19: error: expected primary-expression before '>' token {#include<iostream> ^ plata3.cpp:54:1: error: expected primary-expression before 'using' using namespace std; ^ plata3.cpp:54:1: error: expected ';' before 'using' plata3.cpp:57:1: error: a function-definition is not allowed here before '{' token { ^ plata3.cpp:65:1: error: a function-definition is not allowed here before '{' token { ^ plata3.cpp:72:1: error: a function-definition is not allowed here before '{' token { ^ plata3.cpp:81:1: error: a function-definition is not allowed here before '{' token { ^ plata3.cpp:55:5: warning: unused variable 'sum' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:19: warning: unused variable 'v' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:27: warning: unused variable 'c' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:35: warning: unused variable 'x' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:43: warning: unused variable 'n' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:45: warning: unused variable 'S' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:55:47: warning: unused variable 'gata' [-Wunused-variable] int sum[1001]={0},v[1001],c[1001],x[1001],n,S,gata=0; ^ plata3.cpp:114:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Plata3 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ă.