09 2024 档案
摘要:贪心+回溯: 找某位的最小值的时候用set实现的二分 求hack #include <algorithm> #include <unordered_set> #include <vector> #include <iostream> using namespace std; // getMaxDig
阅读全文
摘要:class Solution { public: /** * Note: 类名、方法名、参数名已经指定,请勿修改 * * * * @param grid int整型 vector<vector<>> * @return int整型 */ int minPathSum(vector<vector<in
阅读全文
摘要:1ns=10^{-9}s 1ms=10^(-6)s 1ms=10^(-3)s 1ns范围:包括访问cpu寄存器速度,现在cpu的时钟周期 1-10ns:包括 l1和l2缓存访问 一些昂贵的cpu操作如分支错误预测惩罚 10-100ns:l3缓存 现代cpu的主内存访问 100-1000ns:linu
阅读全文
摘要:https://kpnhh4zsm6.feishu.cn/mindnotes/DVdobz4bhmMpkpn7fo5c15xzngh?from=from_copylink
阅读全文
摘要:让普通变量 long = 一个空的Long对象 public class UnboxingNpe { private static int add(int x, int y) { return x + y; } private static boolean compare(long x, long
阅读全文
摘要:使用java7的新api try(){}; 普通做法 private String traditionalTryCatch() throws IOException { // 1. 单一资源的关闭 // String line = null; // BufferedReader br = new B
阅读全文
摘要:提供一个简单刷题的飞书Excel模板 https://kpnhh4zsm6.feishu.cn/sheets/N4tlsx05PhrJaLtcJEmccfnfn9d 尽量写的简洁好背。 “想要背的快,除了多敲,优化逻辑,让思维固化没有其他办法”。提供一份简介的代码。 1.能不嵌套自增语句就不嵌套 2
阅读全文