摘要: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 10010; int n; struct Segment { int x, 阅读全文
posted @ 2022-05-15 17:25 兮何其 阅读(35) 评论(0) 推荐(0)
摘要: ####不修改val的值,只改变链表结构,时间复杂度O (nlgn), 额外空间O(lgn) class Solution { public: ListNode* getTail(ListNode *head){ while(head->next){ head = head->next; } ret 阅读全文
posted @ 2022-05-15 15:33 兮何其 阅读(53) 评论(0) 推荐(0)
摘要: ACwing class Solution { public: vector<int> getMinimumValue(int n) { const int INF = ~(1 << 31); //自然是有符号数的最大值 int l = 0, r = n - 1; //二分边界 while(l <= 阅读全文
posted @ 2022-05-15 15:23 兮何其 阅读(48) 评论(0) 推荐(0)
摘要: ACwing 阅读全文
posted @ 2022-05-15 15:05 兮何其 阅读(21) 评论(0) 推荐(0)