文章分类 -  OI笔记

摘要:void heapup(){ int i=a[0]; while(i>1&&a[i]<a[i/2]){ swap(a[i],a[i/2]); i/=2; } } void heapdown(){ int i=1,j; while(i*2<=a[0]){ if(i*2==a[0]||a[i*2]<a[ 阅读全文
posted @ 2022-11-14 18:27 ASnown 阅读(46) 评论(0) 推荐(0)
摘要:1. register&static&inline 在定义局部非char类型的变量时在前面加入register 在局部char类型变量前加入static 在非主函数和非递归函数前加入inline 2. 火车头传送门(外网评测) 3. 快读 inline int read(){ register in 阅读全文
posted @ 2022-11-14 18:16 ASnown 阅读(61) 评论(0) 推荐(0)