摘要: 阅读全文
posted @ 2023-05-22 20:53 Hbro 阅读(16) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main(){ int n, x1, y1; cin >> n; int a[10001], b[10001], x[10001], y[10001]; for (int i = 0; i < n; i++) { 阅读全文
posted @ 2023-05-18 21:11 Hbro 阅读(33) 评论(0) 推荐(0)
摘要: /#include<iostream>//using namespace std;//bool vis[25][25];//long long step[25][25];//就是 dp 数组//int main()//{// step[1][1] = 1;// int n, m, x, y;// c 阅读全文
posted @ 2023-05-17 15:10 Hbro 阅读(43) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) :  阅读全文
posted @ 2023-05-16 21:47 Hbro 阅读(12) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : 阅读全文
posted @ 2023-05-15 21:04 Hbro 阅读(16) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) :  阅读全文
posted @ 2023-05-14 10:04 Hbro 阅读(13) 评论(0) 推荐(0)
摘要: class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int n = nums.size(); vector<int>idxs; for(int i = 0;i<n;i++) idxs.push_ba 阅读全文
posted @ 2023-05-14 10:02 Hbro 阅读(16) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *///class Sol 阅读全文
posted @ 2023-05-14 10:00 Hbro 阅读(12) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) :  阅读全文
posted @ 2023-05-11 21:19 Hbro 阅读(10) 评论(0) 推荐(0)
摘要: /方法一:反转链表逐个比较/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; 阅读全文
posted @ 2023-05-10 21:08 Hbro 阅读(10) 评论(0) 推荐(0)