148

[LeetCode Hot 100] LeetCode148. 排序链表

题目描述 思路一:堆排序、小顶堆 定义一个最小堆 将链表的所有节点放入一个最小堆中 直接用队列弹出的最小值依次覆盖掉原链表的值 方法一: /** * Definition for singly-linked list. * public class ListNode { * int val; * L ......
LeetCode Hot 100 148

AcWing 148. 合并果子

题面: 把所有的果子合成一堆:每一次合并,可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。 达达在合并果子时总共消耗的体力等于每次合并所耗体力之和。 假定每个果子重量都为 \(1\),并且已知果子的种类数和每种果子的数目,你的任务是设计出合并的次序方案,使达达耗费的体力最少,并输出这个最 ......
果子 AcWing 148

文心一言 VS 讯飞星火 VS chatgpt (148)-- 算法导论12.2 3题

三、用go语言,写出过程 TREE-PREDECESSOR 的伪代码。 文心一言: 以下是使用Go语言编写的TREE-PREDECESSOR函数的伪代码: func TREE-PREDECESSOR(node) { if node.parent != nil { return node.parent ......
文心 导论 算法 chatgpt VS

Go每日一库之148:base64Captcha(多种形式验证码)

[Base64captcha](https://github.com/mojocn/base64Captcha) 几行代码就可以定义自己内容的图形验证码库,支持任意unicode字符的内容. ## 1. 文档&Demo - [English](https://godoc.org/github.com ......
多种 形式 Captcha base 148

《看了受制了》第二十九天,7道题,合计148道题

2023年9月28日 好尴尬啊,好尴尬啊,怎么就想不到呢?今天的C、D思路都是来源于知乎大佬。 【 >此篇博客解析< 】 Acwing1275 最大数 题目理解 线段树,板子题。但是需要转化!! 每次添加一个数,看作在flag + 1的位置上,修改一个数 然后query是求l 到 flag的最大值 ......
九天 148

[Go 夜读 第 148 期] Excelize 构建 WebAssembly 版本跨语言支持实践

本期分享将对 Excelize 的 2023 年部分更新背后的技术点、Go 1.21.0 版本中 XML 标准库的兼容性问题,以及如何构建 WebAssembly 版本跨语言支持展开讨论。 ......
WebAssembly Excelize 版本 语言 148

148. 排序链表

给你链表的头结点 head ,请将其按 升序 排列并返回 排序后的链表 。 输入:head = [4,2,1,3] 输出:[1,2,3,4] > 思路1: 采用二路归并排序,分为递归和迭代 两种方法。 递归采用快慢指针,找到链表的中点,断开,然后对两条链表进行二路归并 class Solution ......
148

148A - Insomnia cure

## A. Insomnia cure [https://codeforces.com/problemset/problem/148/A](https://codeforces.com/problemset/problem/148/A) ##### «One dragon. Two dragon. ......
Insomnia 148A cure 148

Educational Codeforces Round 148 (Rated for Div. 2)E. Combinatorics Problem(组合数,动态规划)

题目链接:https://codeforces.com/contest/1832/problem/E 题意: 当然这是化简后的题意,原题面和这个差距还是有点大的; 分析: 因为组合数有公式: 所以: 嗯,然后就没有了; 时间复杂度:O(n*k); 代码: #include<bits/stdc++.h ......

Leetcode148 排序链表

148. 排序链表 - 力扣(LeetCode) /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr ......
Leetcode 148

【题解】Educational Codeforces Round 148(CF1832)

## A.New Palindrome ### 题目描述: 给你一个由小写字母组成的回文字符串,问你是否能在重排其之后构造出另一个与原串不同的回文字符串。 多测,$t \le 1000,2 \le |s| \le 50$ ### 题目分析: 考虑其实就是前 $\lfloor \frac{n}{2} ......
题解 Educational Codeforces Round 1832

【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I

# [【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I](https://www.luogu.com.cn/contest/101050#problems) ## P9502 『MGOI』Simple Round I | A. 魔法数字 ### 思路 通过题目信息,可以很 ......
基础 Round MGOI LGR 148

【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I

# [【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I](https://www.luogu.com.cn/contest/101050#description) ### 据说是普及组难度? ## T1 [P9502 『MGOI』Simple Round I | A. 魔 ......
基础 Round MGOI LGR 148

【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I

# [【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I](https://www.luogu.com.cn/contest/101050) ![](https://cdn.luogu.com.cn/upload/image_hosting/g76g8e1g.png) ## ......
基础 Round MGOI LGR 148

【LGR-148-Div.3】洛谷基础赛 #1 & MGOI Round I

## T1 简单题,题面十分清晰,就是给我们$n$,要求使$2^m #define ll long long #define re register using namespace std; const int N=800, INF=0x3f3f3f3f; ll n; int main(){ cin ......
基础 Round MGOI LGR 148

[Typescript Challenge] 148 Medium - CartesianProduct

Given 2 sets (unions), return its Cartesian product in a set of tuples, e.g. CartesianProduct<1 | 2, 'a' | 'b'> // [1, 'a'] | [2, 'a'] | [1, 'b'] | [2 ......

D. Bag of mice -- (概率Dp)codeforces 148

###原题链接:[https://codeforces.com/contest/148/submission/213227373](https://codeforces.com/contest/148/submission/213227373) ###题意:捉老鼠游戏,谁捉到白鼠就是胜利,我们求公主 ......
概率 codeforces mice Bag 148

LeetCode 148. 排序链表

``` class Solution { public: ListNode* sortList(ListNode* head) { if(!head||!head->next) return head; ListNode* fast=head,*slow=head; while(fast->next ......
LeetCode 148

【雕爷学编程】Arduino动手做(148)---MD-PS002压力传感器模块

37款传感器与执行器的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止这37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的,这里准备逐一动手尝试系列实验,不管成功(程序走通)与否,都会记录下来—小小的进步或是搞不掂的问 ......
传感器 模块 压力 Arduino MD-PS

AtCoder Regular Contest 148 E ≥ K

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc148_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc148/tasks/arc148_e "AtCoder 传送门") 是一道不错的计数。 ......
AtCoder Regular Contest 148

Educational Codeforces Round 148 (Rated for Div. 2) D1. Red-Blue Operations

[Easy Version传送门](https://codeforces.com/contest/1832/problem/D1) [Hard Version传送门](https://codeforces.com/contest/1832/problem/D1) 题目大意: ![](https:// ......

Educational Codeforces Round 148 (Rated for Div. 2)

# Preface 补题,这场比较简单,E之前的都能写出来,当然D的细节挺多的WA了好几发 感觉时间好不够用啊,想补的题那么多但效率好低,可能要等暑假才能集中攻克了 # A. New Palindrome 统计下出现了一次以上的字符有几种,如果大于等于两种就有解 ```cpp #include #i ......
Educational Codeforces Round Rated 148

Educational Codeforces Round 148 (Rated for Div. 2) A~E

## Educational Codeforces Round 148 (Rated for Div. 2) A~E ### A. New Palindrome 对于奇回文串不能统计中心的字符,然后判断是否有不同的字符 ```c++ void work() { string s; cin >> s; ......
Educational Codeforces Round Rated 148

Educational Codeforces Round 148 (Rated for Div. 2) A-D2

Educational Codeforces Round 148 (Rated for Div. 2) A. New Palindrome map<int,int>mp; void solve(){ string s; mp.clear(); cin>>s; for(int i=0;i<s.size ......
Educational Codeforces Round Rated 148

[ABC148F] Playing Tag on Tree

2023-03-04 题目 题目传送门 翻译 翻译 难度&重要性(1~10):5 题目来源 AtCoder 题目算法 最短路 解题思路 考虑到 T 想活得久, A 想尽早追上 T ,所以我们就将问题转化为在树上找一条最长链,使得 T 能比 A 先到达这条链。 所以我们就可以在树上跑两遍单源最短路,因 ......
Playing 148F Tree ABC 148

LeetCode 148. 排序链表

前置题目 21. 合并两个有序链表 原题解 ###题目 约束 ###题解 ####方法一 class Solution { public: ListNode* sortList(ListNode* head) { return sortList(head, nullptr); } ListNode* ......
LeetCode 148

AtCoder Beginner Contest 148

AtCoder Beginner Contest 148 https://atcoder.jp/contests/abc148 这场比较简单 D - Brick Break 二分 or LIS #include <bits/stdc++.h> #define ll long long using n ......
Beginner AtCoder Contest 148

(数据科学学习手札148)geopandas直接支持gdb文件写出与追加

本文示例代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 大家好我是费老师,在我之前的某篇文章中为大家介绍过如何在windows系统上,基于ESRI FileGDB驱动为geopandas补充针对gdb文件 ......
手札 geopandas 文件 科学 数据
共28篇  :1/1页 首页上一页1下一页尾页