摘要: 链接:https://www.nowcoder.com/acm/contest/141/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 时间限制:C/C+ 阅读全文
posted @ 2018-07-28 10:45 莜莫 阅读(267) 评论(1) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1745 Divisibility Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13431 Accepted: 4774 Description Consider 阅读全文
posted @ 2018-07-28 00:36 莜莫 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目描述 Eddy has solved lots of problem involving calculating the number of coprime pairs within some range. This problem can be solved with inclusi 阅读全文
posted @ 2018-07-27 15:37 莜莫 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 题目链接:POJ 2299 Ultra-QuickSort Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n 阅读全文
posted @ 2018-07-27 14:46 莜莫 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 参考:算法学习(二)——树状数组求逆序数 、线段树或树状数组求逆序数(附例题) 应用树状数组 || 线段树求逆序数是一种很巧妙的技巧,这个技巧的关键在于如何把原来单纯的求区间和操作转换为 求小于等于a的数的总数 再转换为 求序列里大于a的数的总数,学习这个技巧源于一道题目 poj 3067 Japa 阅读全文
posted @ 2018-07-26 11:10 莜莫 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目链接 HDU 1698 Problem Description: In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made 阅读全文
posted @ 2018-07-22 15:54 莜莫 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接 HDU 1166 大概题意: 第一行一个整数T,表示有T组数据。每组数据第一行一个正整数N(N<=50000),表示敌人有N个工兵营地,接下来有N个正整数,第i个正整数ai代表第i个工兵营地里开始时有ai个人(1<=ai<=50)。接下来每行有一条命令,命令有4种形式:(1) Add i 阅读全文
posted @ 2018-07-22 14:54 莜莫 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.nowcoder.com/acm/contest/140/D 题目描述: White Cloud has built n stores numbered from 1 to n.White Rabbit wants to visit these stores in th 阅读全文
posted @ 2018-07-22 11:50 莜莫 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/140/A 题目描述: White Cloud is exercising in the playground.White Cloud can walk 1 meters or run k meters per seco 阅读全文
posted @ 2018-07-22 00:46 莜莫 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 刚开始接触图论这一模块是觉得什么二叉树啊,什么堆啊,什么优先队列啊这些东西很难搞,终于等到放假了,抱着本算法书,发现和教练说的一样,树是一种很神奇很简单的东西,很讨人喜欢。 二叉树的性质: 性质1:二叉树上结点数等于度为 2 的结点数加 1; 性质2:二叉树的第 i 层上至多有 2^( i-1 ) 阅读全文
posted @ 2018-07-22 00:27 莜莫 阅读(5586) 评论(0) 推荐(0) 编辑