摘要:
C++ 内存管理 C++ primitives 包含new,new[],new(),::operator new(),... ::operator new() 本质就是调用malloc ::operator delete 本质就是调用free 举个有意思的例子 接着举个使用new 的例子 或者说是n 阅读全文
摘要:
C++ 更新于20200320 15:17 引用与指针的区别 1. 指针有多级,引用没有多级 2. 指针可以为null,但是引用不可以 3. 在加法运算符的方面 两者概念是不同的,p++指的是地址的增加,q++指的是引用的值的增加 4. 指针在使用中可以指向其他对象,但是引用只能是一个对象的引用,不 阅读全文
摘要:
"链接" [思路]: 首先这个题目就是问从左上角传到右下角,再从左下角传回右上角的路径和的最大值,每个位置不能重复走 其实考虑后可以发现,可以将问题简化成从左上角到右下角的两条路径和,那么不能重复走怎么处理呢? 经过思考我们可以知道显然不会从相同的格子转移获得最大值的情况,所以问题又可以简化为从左上 阅读全文
摘要:
E. Editor "题目链接" time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The development of a text ed 阅读全文
摘要:
"题目链接" Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others. One day, there is another tribe become the 阅读全文
摘要:
"题目链接" Problem Description Consider a un rooted tree T which is not the biological significance of tree or plant, but a tree as an undirected graph in 阅读全文
摘要:
Lpl and Energy saving Lamps "题目链接" During tea drinking, princess, amongst other things, asked why has such a good natured and cute Dragon imprisoned L 阅读全文
摘要:
C Insertion Sort(数学规律题, 递推) Insertion sort is a simple sorting algorithm that builds the final sorted array one item at an iteration. More precisely, 阅读全文
摘要:
Secret Poems "原题链接" The Yongzheng Emperor (13 December 1678 – 8 October 1735), was the fifth emperor of the Qing dynasty of China. He was a very hard 阅读全文
摘要:
D. Paint the Tree [思路]:显然这是一个树的染色问题,那么其实根据题意,我们分析一容易发现当一个点度大于2那么肯定是无解的,有解的情况必然是一条链,那么我们只要建图找到度为1的点,跑6种情况的染色方案即可 "原题链接" C++ include include include inc 阅读全文