摘要: link #include <bits/stdc++.h> # define LL long long using namespace std; class TreeNode{ public: int val; TreeNode* left; TreeNode* right; TreeNode(in 阅读全文
posted @ 2020-03-06 14:05 feibilun 阅读(124) 评论(0) 推荐(0) 编辑
摘要: link select t3.id as transactions_count, if(t5.cnt is null,0,t5.vcnt) as visits_count from ( select t0.id from ( select @num:=@num+1 as id from (selec 阅读全文
posted @ 2020-03-05 18:53 feibilun 阅读(303) 评论(0) 推荐(0) 编辑
摘要: PCB 进程控制块 getenv 获取环境变量 父进程先死,子进程变为孤儿。 加sleep,让父进程最后死。 查看进程信息: ps aux 有ppid信息: ps ajx 杀死进程: kill -9 pid kill表示给进程发信号,-9表示发9号信号 kill -l 查看信号信息 生5个子进程 精 阅读全文
posted @ 2020-03-04 15:53 feibilun 阅读(236) 评论(0) 推荐(0) 编辑
摘要: link /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * 阅读全文
posted @ 2020-03-01 20:01 feibilun 阅读(194) 评论(0) 推荐(0) 编辑
摘要: link Solution 1 : min cost flow Break each cell into two nodes i and i', connect i to i' (i+mn) with an edge with flow 1, cost 0. For each cell i, con 阅读全文
posted @ 2020-03-01 15:06 feibilun 阅读(149) 评论(0) 推荐(0) 编辑
摘要: //-rw-rw-r-- 2 zijiao zijiao 16 Feb 24 13:20 hello #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl 阅读全文
posted @ 2020-02-29 17:20 feibilun 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Video by Tushar https://www.geeksforgeeks.org/binary-indexed-tree-or-fenwick-tree-2/ #include <bits/stdc++.h> # define LL long long using namespace st 阅读全文
posted @ 2020-02-26 11:36 feibilun 阅读(138) 评论(0) 推荐(0) 编辑
摘要: link Solution: https://codeforces.com/blog/entry/74224 #include <bits/stdc++.h> # define LL long long using namespace std; string s; int main(){ int T 阅读全文
posted @ 2020-02-25 21:52 feibilun 阅读(290) 评论(0) 推荐(0) 编辑
摘要: link Solution 1 gready: class Solution { public: string largestMultipleOfThree(vector<int>& digits) { multiset<int,greater<int>> one, two; int sum=0; 阅读全文
posted @ 2020-02-23 16:23 feibilun 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑