博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
FatMouse's Speed
阅读量:4306 次
发布时间:2019-06-06

本文共 1308 字,大约阅读时间需要 4 分钟。

本文纯属个人见解,是对前面学习的总结,如有描述不正确的地方还请高手指正~

    

 
    每日一道理
只有启程,才会到达理想和目的地,只有拼搏,才会获得辉煌的成功,只有播种,才会有收获。只有追求,才会品味堂堂正正的人。
// File Name: hdu1160.cpp// Author: rudolf// Created Time: 2013年04月25日 木曜日 14时47分25秒 #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std; const int maxn = 1005; struct node { int w,v,num; }mouse[ maxn ]; int dp[ maxn ]; int path[ maxn ]; int cmp( node a1,node a2 ) { if( a1.w!=a2.w ) return a1.w
a2.v; } int main() { int cnt=0; while( scanf("%d%d",&mouse[ cnt ].w,&mouse[ cnt ].v)!=EOF ) { mouse[ cnt ].num=cnt+1; path[ cnt ]=-1; cnt++; } sort( mouse,mouse+cnt,cmp ); int max_dp,max_num; max_dp=max_num=0; dp[ 0 ]=1; for( int i=1;i
mouse[ i ].v && my_max
s; s.push( mouse[max_num].num ); while( path[max_num]!=-1 ) { s.push(mouse[path[max_num]].num); max_num=path[max_num]; } printf("%d\n",s.size()); while( !s.empty() ) { printf("%d\n",s.top() ); s.pop(); } return 0; }

    

文章结束给大家分享下程序员的一些笑话语录: AdobeFlash拖垮Windows拖垮IE!又拖垮Linux拖垮Ubuntu拖垮FirxEox!还拖垮BSD拖垮MacOS拖垮Safri!简直无所不拖!AdobeFlash滚出网路世界!不要以为市占有率高就可以持续出烂货产品!以后替代品多得是!

转载于:https://www.cnblogs.com/jiangu66/archive/2013/04/25/3043424.html

你可能感兴趣的文章
Linux之RPM 软件管理程序
查看>>
.NET 面试题(2)
查看>>
(转)java内部类详解
查看>>
mysql+mybatis递归调用
查看>>
mongoDB的安装(一)
查看>>
Spring Boot:快速入门教程
查看>>
「BZOJ2879」[Noi2012]美食节
查看>>
谈项目需求
查看>>
C#判断字符串是否为数字字符串
查看>>
I/O模型
查看>>
Spring Data JPA初使用 *****重要********
查看>>
xenu工具介绍
查看>>
hdu 5730 Shell Necklace——多项式求逆+拆系数FFT
查看>>
python try 异常处理 史上最全
查看>>
poj3723Conscription
查看>>
判断listview是上滑还是下滑的方法
查看>>
转: Vim快捷键分类
查看>>
P1971 [NOI2011]兔兔与蛋蛋游戏
查看>>
SSM整合笔记
查看>>
Generator 函数的异步应用
查看>>