摘要:
23. Merge k Sorted Lists You are given an array of k linked-lists ... 阅读全文
摘要:
文章目录 32. Longest Valid Parentheses题意:思路:84. Largest Rectangle in ... 阅读全文
摘要:
152. Maximum Product Subarray Given an integer array nums, find th... 阅读全文
摘要:
题目链接 leetcode 142. Linked List Cycle II 题目大意 给定一个链表,判断链表内部是否含有环。输出... 阅读全文
摘要:
1. P1060 开心的金明 解题思路 最基本的01背包问题,如果不用优化成一维数组,那么用f(i,j)表示前i个商品花j元钱获得的... 阅读全文
摘要:
优先队列默认大顶堆,即堆顶元素是最大值 改成小顶堆时: priority_queue<int,vector<int>, greater<int> > Q;//注意最后这里> >需要有空格,不然默认右移运算符>> 或者结构体重载operator排序, 注意排序方式与大小顶堆相反 阅读全文
摘要:
####多进程统计cpu 数目 n_cpu = multiprocessing.cpu_count() print(n_cpu) 查看文件夹占用磁盘空间 du -h --max-depth=1 /path 查看磁盘空间 df -h 查看服务器对应的ip ip -a address (enp9s0) 阅读全文
摘要:
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt print('hello world\n') \[ y=exp(x^2)+z^3 \tag{1} \] 0. test where there is 阅读全文
摘要:
mv `ls | head -N` ./subfolder1/ 其中N表示需要移动的文件数目,subfolder1表示目标目录 参考... 阅读全文
摘要:
题目链接 https://leetcode.com/problems/longest-palindromic-substring 解... 阅读全文