发量不减

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2024年1月7日

摘要: //仓库规划 #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { //N表示仓库个数,M表示位置编码的维数 int N, M, t1, t 阅读全文
posted @ 2024-01-07 22:36 不是孩子了 阅读(14) 评论(0) 推荐(0) 编辑

摘要: //二分查找 #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int search(vector<int>& nums, int target) { int l 阅读全文
posted @ 2024-01-07 17:39 不是孩子了 阅读(2) 评论(0) 推荐(0) 编辑

摘要: //三数之和 #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; vector<vector<int>> threeSum(vector<int>& nums) { 阅读全文
posted @ 2024-01-07 16:00 不是孩子了 阅读(2) 评论(0) 推荐(0) 编辑

摘要: //最接近的三数之和 #include<iostream> #include<string> #include<vector> #include<cmath> #include<algorithm> using namespace std; //双指针 int threeSumClosest(vec 阅读全文
posted @ 2024-01-07 15:14 不是孩子了 阅读(2) 评论(0) 推荐(0) 编辑