算法
文章平均质量分 57
Jodie大白话
知识不缺页,状态无异常。
展开
-
partition by & group by
partition by & group by原创 2023-04-14 16:26:50 · 74 阅读 · 1 评论 -
查找B中有A中没有的数
【代码】查找B中有A中没有的数。原创 2023-04-14 10:37:47 · 61 阅读 · 0 评论 -
二分查找边界问题
使用二分查找找出左右边界,再相减得到次数。统计一个数字在排序数组中出现的次数。原创 2023-04-14 10:19:44 · 91 阅读 · 0 评论 -
判断谁是预言家
所有人都相信预言家。预言家不相信任何人。给出一组数组trust[i] = {ai,bi},代表ai相信bi,ai不等于bi,0原创 2023-01-08 20:03:12 · 99 阅读 · 0 评论 -
幼儿园小朋友调整队形
在幼儿园有N个小朋友排列为一队,从左到右一个挨着一个编号为(0~N-1)。其中男生用M表示,女生用F表示。小朋友们都很顽皮,当一个男生挨着的是女生的时候就会发生矛盾。作为幼儿园的老师,你需要让男生挨着女生或者女生挨着男生的情况最少,即。,现在需要尽快完成队伍调整,计算出最少需要调整多少次。例如: FFMMF -> FFMFM-> FFFMM,需要调整队形2次。你需要调整当前位置,每次调整只能让。男生坐在一起,女生坐在一起。相邻的两个小朋友交换位置。原创 2023-01-08 19:52:56 · 144 阅读 · 0 评论 -
1099 Build A Binary Search Tree(30)
🧡1099 Build A Binary Search Tree原创 2022-11-16 15:14:48 · 184 阅读 · 0 评论 -
PAT数字&字符串处理
🧡1019 General Palindromic Number(20)🧡1024 Palindromic Number(25)🧡1100 Mars Numbers(20)🧡常用语法原创 2022-11-08 21:10:29 · 256 阅读 · 0 评论 -
1023 Have Fun with Numbers(20)求大佬帮忙看看测试点2,3,5
1023 Have Fun with Numbers(20)求大佬帮忙看看测试点2,3,5原创 2022-11-08 15:33:13 · 227 阅读 · 0 评论 -
1018 Public Bike Management (30) & 1030 Travel Plan (30)
1018 Public Bike Management (30) & 1030 Travel Plan (30)(Dijkstra+DFS)原创 2022-11-07 15:51:04 · 326 阅读 · 0 评论 -
1014 Waiting in Line(30)& 1017 Queueing at Bank(25)
1014 Waiting in Line(30)& 1017 Queueing at Bank(25)踩坑点!!原创 2022-11-03 17:56:06 · 148 阅读 · 0 评论 -
1081 Rational Sum(20)
1081 Rational Sum(20)原创 2022-11-02 16:59:12 · 59 阅读 · 0 评论 -
1016 Phone Bills(25)
1016 Phone Bills(25)原创 2022-11-02 16:13:34 · 136 阅读 · 0 评论 -
Counting Leaves (30)
Counting Leaves (30)原创 2022-08-23 15:07:25 · 58 阅读 · 0 评论 -
2019-3 To Fill or Not to Fill (30 分)
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different gas station may give different price. You are asked to car原创 2022-01-11 13:25:41 · 433 阅读 · 0 评论 -
2019-2 Review of Programming Contest Rules (30 分)
The ACM ICPC's rule of scoring is as the following:A problem is solved when it is accepted by the judges. Teams are ranked according to the most problems solved. For the purposes of awards, or in determining qualifier(s) for the World Finals, teams who s原创 2022-01-11 13:23:32 · 454 阅读 · 1 评论