摘要: 青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 122921 Accepted: 26169 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上 阅读全文
posted @ 2018-02-20 22:33 zero1998 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 问题是 给你a1到an的所有数字,让你找到和为k的情况有没有可能存在。 分析: 每一个数字都有加或者不加的情况,所以用深度搜索把所有情况都遍历一下即可 代码如下: #include<iostream> using namespace std; #define Max_n 100000 int a[M 阅读全文
posted @ 2018-02-18 22:26 zero1998 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Ants Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 21604 Accepted: 8858 Description An army of ants walk on a horizontal pole of length l 阅读全文
posted @ 2018-02-14 11:44 zero1998 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/78/F来源:牛客网 今天是某不愿透露姓名的谈姓大佬的生日,转发这场比赛到三个群就可以,获得以下三种礼包之一。 豪华礼包:一个U盘、一个鼠标和一个机械键盘。 幸运礼包:一个U盘、两个鼠标。 普通礼包:两个U盘、一个鼠标。 阅读全文
posted @ 2018-02-13 21:45 zero1998 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 今天学习01背包的问题,在网上看到一个写的很好很容易懂的讲解,分享在这里,以后自己也可以时常拿出来看一看,理解思想 原文链接如下: http://blog.csdn.net/woshioosm/article/details/7438834 通过金矿模型介绍动态规划 对于动态规划,每个刚接触的人都需 阅读全文
posted @ 2018-02-11 10:06 zero1998 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 最少拦截系统 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 50242 Accepted Submission(s): 19684 Proble 阅读全文
posted @ 2018-02-10 11:49 zero1998 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 题目:给你一个长度为n的序列,让你找到最长上升子序列的长度. 分析: 这个是dp的经典问题,今天拿来重新学习一下。 如果按照贪心的想法,是很容易看到有问题的,比如一串数字 1,3,-3,-2,-1; 贪心的话从1开始,依次序列结尾的数字大的数,1,3长度为2,实际上LIS的长度为3 所以不能够用贪心 阅读全文
posted @ 2018-02-09 18:15 zero1998 阅读(116) 评论(0) 推荐(0) 编辑
摘要: C. Cave Painting time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Imp is watching a docume 阅读全文
posted @ 2018-02-08 21:26 zero1998 阅读(354) 评论(1) 推荐(0) 编辑
摘要: B. Magic Forest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Imp is in a magic forest, 阅读全文
posted @ 2018-02-08 17:06 zero1998 阅读(333) 评论(0) 推荐(0) 编辑
摘要: A. Cloning Toys time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Imp likes his plush toy a 阅读全文
posted @ 2018-02-08 16:34 zero1998 阅读(394) 评论(1) 推荐(0) 编辑