贪心-硬币问题(白皮书例1)

//硬币问题 #include <cstdio> #include <iostream> using namespace std; const int V[6]={1,5,10,50,100,500}; int C[6]; int A; int main() {     int i;     int ans=0;     for(i=5;i>=0;i--)   //贪心是一种最优策略,贯彻这种策略
相关文章
相关标签/搜索