上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: https://www.lanqiao.cn/problems/605/learning/?contest_id=51 题解 这题看似是一道进制转换题目 实则还有很多坑点 比如对于数字702 我们通常进制转换会将其变为110 然而702对应的... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 845. 八数码 - AcWing题库 179. 八数码 - AcWing题库 题解: 题意就是寻找最终状态所需要的最小交换次数 每一步的状态都可以写成一个字符串的形式 如 的状态表示为"123x46758" 故末状态就是12345678x 寻找最小... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(17) 评论(0) 推荐(0) 编辑
摘要: UVA120 Stacks of Flapjacks 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1208. 翻硬币 - AcWing题库高质量的算法题库https://www.acwing.com/problem/content/1210/ 题解: 一个长度为n的串 ********** o****o**** 把同时翻转第i枚和第i+1枚硬币看作是... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 营救 - 洛谷https://www.luogu.com.cn/problem/P1396错题 题解: 直接进行Kruskal 将边从小到大排序后 进行合并操作, 不需要考虑前面的这些边是否会经过 因为若当前s到t不连通,则s... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(13) 评论(0) 推荐(0) 编辑
摘要: [ARC075B] Widespread - 洛谷https://www.luogu.com.cn/problem/AT2580?contestId=56578前排提醒 本题的数据范围比较大,全用long long最好 否则会有一部分点会WA 我们每一次攻击... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 首先储存区间,不必多言 struct node{ int a,b; } s[55010]; 刚开始的想法是想先把所有的子区间按从小到大的顺序排列。 先排左端点,左端点相同再排右端点 如 [1,4] [2,3] [3,6] bool compare(node ... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 思路:每次找当前序列中的最大值,想办法把他放在序列中的末尾就可以了 找最大值时,有以下三种情况: ① 最大值就在序列尾部.无需处理,找前i-1个数中的最大值 ② 最大值在序列首部. 将序列翻转,最大值就到了尾部,然后执行① ③ 最大值在某个位置. 挨个搜... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 原题链接Online JudgeOnline Judgehttps://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3601 VJ链接... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 2021年8月18日09:02:13 #include//2021年8月17日21:43:13int median3(int n[],int a,int b,int c){ if((n[a]>=n[b] && n[a]=n[c])) return a; if... 阅读全文
posted @ 2022-09-17 19:35 LZH_03 阅读(16) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页