自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小猪爱拱地

勤奋和毅力是通向成功的阶梯

  • 博客(3)
  • 资源 (1)
  • 收藏
  • 关注

原创 删除 最小(最大)堆第k个元素

添加一个idx,每次改变堆上元素位置的时候,实时更新元素的位置;删除第k个元素的时候,相当在以第k个元素为根节点的子树里面,把根节点 pop出来。 示例代码如下: struct package { int pid; int price; int idx; }; struct package g_package[100]; int g_idx; struct package *g...

2019-08-31 21:44:30 346

原创 Dynamically load executable

在一个可执行程序里面可以以load动态库的形式执行另外一个程序: $ cat 1.c #include <stdio.h> int main(void) { printf("hello,world\n"); return 0; } gcc 1.c -g -o 1 -fPIC -pie fPIC 和 pie选项是为了让 executable成为一个 ...

2019-08-24 15:39:45 635

转载 Dynamic linker tricks: Using LD_PRELOAD to cheat, inject features and investigate programs

Dynamic linker tricks: Using LD_PRELOAD to cheat, inject features and investigateprograms April 2, 2013 — Rafał Cieślak This post assumes some basic C skills. Linux puts you in full control. This ...

2019-08-07 10:20:28 262

Algorithm (4th), by Robert Sedgewick

Amazon 五星书。 Classic Reference The latest version of Sedgewick’s best-selling series, reflecting an indispensable body of knowledge developed over the past several decades. Broad Coverage Full treatment of data structures and algorithms for sorting, searching, graph processing, and string processing, including fifty algorithms every programmer should know. See algs4.cs.princeton.edu/code. Completely Revised Code New Java implementations written in an accessible modular programming style, where all of the code is exposed to the reader and ready to use.

2012-04-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除