摘要:
最近比较累,特别是眼睛..... 距离省赛还有7天,虽然说最近比较累,但还是收获很多,学到了很多知识,在想,如果大一但现在一直这么学,绝对了...- -! 最近天天在晨跑,感觉很不错,突然在寝室聊到跑道的问题,说橡胶跑道比较好,遥想从上学到现在,还木有上过带塑胶跑道的学校,悲催~ 阅读全文
摘要:
题意:给定平行四边形的3个顶点的坐标,求第四个点的坐标和平行四边形的面积。思路:几何基础题,不过用向量比较简单。题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1305View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 7 using na 阅读全文
摘要:
题意:给定n,求1+1/2+1/3+....+1/n,1<=n<=10^8。思路:精度问题,欧拉常数:0.57721566490153286060651209 ,当n很大时就派上用场了- -!题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1234View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algori 阅读全文
摘要:
5.12、又是一年..........当看到这张图片时,心中再次被刺痛.......一位漂亮的“芭蕾女孩”的前程就这样断送.........对于女孩来说、心中是怎样的痛苦...........当她再次回到母校时,伤感、不言而喻........再次对于逝去的同胞表示深切的哀痛、逝者安息、生者如斯!愿在灾难中幸存的人们能够坚强、快乐!!!!!! 阅读全文
摘要:
晚上回来的路上、 仰望苍穹,夜空很美、 墨蓝星空、 朵朵白云、 在星空与白云之间,颗颗繁星、 真有感觉~ 又是一天,充实~ 阅读全文
摘要:
题意:区间染色,求染色次数大于等于k的长度。思路:因为n的范围比较小,直接离散化。----经典好题!!题目链接:http://acm.jlu.edu.cn/joj/showproblem.php?pid=2746例:View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 7 #include <map> 阅读全文
摘要:
突然间发现,Map中的元素是自动按key升序排序的。附代码:View Code 1 #include <map> 2 #include <iostream> 3 using namespace std; 4 5 int main( ) 6 { 7 // freopen("data.in","r",stdin); 8 // freopen("data.out","w",stdout); 9 10 map <int, int> m1; 11 map <int, int>: 阅读全文
摘要:
在挫折中成长!!! 在失败中总结经验!!! May the force be with you!!! 阅读全文
摘要:
题意:给出二叉排序树的后序遍历序列,要求遍历右子树->左子树->根的序列。思路:二叉树基本操作。题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1136View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 7 using namespace 阅读全文
摘要:
题意:给出两个序列a[],b[],第一个递减,第二个随机,问怎样交换第二个序列(每次相邻两个互换),使得第二个序列每个位置上的数都小于等于第一个序列。例:sample input:33 2 12 2 133 2 11 2 346 5 3 11 3 5 5sample output:035思路:a,b都从最后开始遍历,若a[i]<b[i],则将b[i]移到a[i]后面,否则标记b[i]。View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include < 阅读全文