DATE 2017.1.13
1.When you want to input some characters,you may meet some special punctuations in your characters.You should write
Scanf"一个space key%c,&a【】【】”
2.learn to use freopen
algorithm
3.C->"qsort" the principle is quicksort.
C++->"sort" it uses many ptinciples.
If you want to change the plain sequence.
use BOOL COMP
If you want to achieve multiple keywords sort.Such as
define struct ty{ int a,b;}x[1000];
bool comp(ty a,ty b)
{ if(x.a==y.a) return x.b<y.b
return x.a<y.a;
}
除此之外 还有重载小于运算符可以实现这样的功能
4.二分查找binary research
5.求最大值最小值max min
6.数据交换swap
7.集合的最大元素最小元素
max_element
min_element
8.内存赋值操作
copy()(ps:效率很高)
9.求下一个排列
next_permutation
prev_permutation