摘要: link class Solution { public: #define ll long long int mod=1E9+7; int uniqueLetterString(string S) { int n=S.size(); ll res=0; vector<int> last1(26,-1 阅读全文
posted @ 2020-02-21 19:43 feibilun 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1. OPEN umask=2, 666&(~2)=664 2. CLOSE 3. Read 4. write 模拟 cat: 需求: 写hello到一个文件,然后读取,输出到终端。 若这样写,read不到,因为写hello后将到文件末尾。 需要lseek lseek 计算文件大小 少了一句: cl 阅读全文
posted @ 2020-02-21 16:51 feibilun 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 使用gdb: 编译时加-g参数 gcc -o app -I ./ func.c main.c -g 启动gdb: gdb app 在gdb启动程序: r(un) 启动 start 启动 停留在main函数,分步调试 n(ext) 下一条语句 s(tep) 下一条语句,可以进入到函数内部 q(uit) 阅读全文
posted @ 2020-02-21 10:09 feibilun 阅读(130) 评论(0) 推荐(0) 编辑