![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
liruiiuril
http://li-rui.org
展开
-
贪心经典问题--删数字的关键代码
while(s>0) { i=0; while(i<strlen(N) && N[i]<=N[i+1]) i++; for(j=i;j<strlen(N);j++) N[j]=N[j+1]; s--; }原创 2013-01-30 13:47:36 · 546 阅读 · 0 评论 -
hdu 1257(3种方法)
#include#include#include#include#include#includeconst int inf = 0;using namespace std;vector q;set p;set::iterator ss,tt,it,l;vector::iterator s,t;int main(){ int n,nn; while(~sca原创 2013-07-06 17:48:09 · 900 阅读 · 0 评论