01 2021 档案

摘要:一 首先就是涉及到一个null和nullptr的区别的问题。之前就经常出现==NULL的问题。 二 c语言,c++,python如何初始化一个节点指针的问题。 首先就是c语言,需要十分熟练地使用malloc函数。 #include<bits/stdc++.h> using namespace std 阅读全文
posted @ 2021-01-28 00:23 TheDa 阅读(73) 评论(0) 推荐(0)
摘要:很方便,两两相邻原点向量求差积,处以二即是面积。 #include<iostream> #include<cstring> #include<algorithm> #include<string> #include<cmath> #include<queue> #include<cstdio> us 阅读全文
posted @ 2021-01-02 18:01 TheDa 阅读(300) 评论(0) 推荐(0)
摘要:母函数可以编程解析,这样就能够很方便求出 正整数拆分问题了。 貌似还有递推公式 f(n, m) = 1; ( n = 1 or m = 1 ) f(n, n); ( n < m ) 1+ f(n, m - 1); ( n = m ) f(n - m, m) + f(n, m - 1); ( n > 阅读全文
posted @ 2021-01-02 16:56 TheDa 阅读(93) 评论(0) 推荐(0)
摘要:void bfs(int sx,int sy) { queue<node>q; vis[sx][sy]=true; q.push(node{sx,sy}); while(!q.empty()) { node pre=q.front(); q.pop(); for(int i=0;i<8;i++) { 阅读全文
posted @ 2021-01-02 16:34 TheDa 阅读(71) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<string> #include<cmath> #include<vector> #include<queue> using name 阅读全文
posted @ 2021-01-01 19:24 TheDa 阅读(103) 评论(0) 推荐(0)
摘要:最长不重复子母的子串 TBD 感觉SB了,滑动窗口不是秒杀这种题目? 同样的还有求最短符合要求连续和问题,也是滑动窗口。http://acm.whu.edu.cn/weblearn/problem/301 阅读全文
posted @ 2021-01-01 17:11 TheDa 阅读(172) 评论(0) 推荐(0)
摘要:求树点直径两次dfs 求树上点到其他点点最远距离hdu2196 点对问题点分治+求树的重心 阅读全文
posted @ 2021-01-01 15:50 TheDa 阅读(76) 评论(0) 推荐(0)