总和leetcode 39
ESP3D ESP32-C3 bulid时报错 'Serial2' was not declared in this scope
ESP3D 版本: 3.0.0-alpha3 错误原因: ESP32-C3只有两个port 解决方法一: github上最新的git已经解决了该问题,使用git获取最新版,不要下载Release的 解决方法二: 去掉Serial2 serial_sevice.cpp中, 第40,41行 将MAX_S ......
vue3+echart5 遇到的坑 Cannot read properties of undefined (reading 'type')(转)
原文:https://www.cnblogs.com/Bin-x/p/15342949.html 1、错误说明 vue3中,使用data的方式初始化echart图表 export default { data() { return { chart: null, ... } }, mounted() ......
LeetCode 115. 不同的子序列
class Solution { public: long long f[1010][1010];//f[i][j]表示s前i个字符得到t前j个字符的所有方案 int numDistinct(string s, string t) { f[0][0]=1; int n=s.size(),m=t.si ......
SpringBoot配置了数据库依赖 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe
错误 2023-04-15 11:56:16.025 INFO 12028 [ restartedMain] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the co ......
TypeScript 报错:Type '({ filename: string; createTime: string; filePath: string; fileId: number; } | undefined)[]' is not assignable to type 'PiFile[]'.
问题: 因为TypeScript不支持直接给一个接口类型的变量 赋一个未知的值。 如 const a:A = { name:'s' }; 你需要给这样的对象或数组值使用as 指定一个类型。 正确写法: const a:A = { name:'s' } as A; 数组写法一样: const a:A[ ......
LeetCode/最大化城市的最小供电站数目
政府批准了可以额外建造 k 座供电站,你需要决定这些供电站分别应该建在哪里,这些供电站与已经存在的供电站有相同的供电范围。 给你两个整数 r 和 k ,如果以最优策略建造额外的发电站,返回所有城市中,最小供电站数目的最大值是多少。 ###一. 二分法+前缀和+贪心 分析:最大化最小值,首先考虑使用二 ......
typescript vue3 VueDraggable 报错 Uncaught TypeError: Cannot read properties of null (reading 'element')
Uncaught TypeError: Cannot read properties of null (reading 'element') nnot read properties of null (reading 'index') 错误写法 就是说子组件需要用div包着,你用其他东西,他无法添加 ......
leetcode-1337-easy
The K Weakest Rows in a Matrix You are given an m x n binary matrix mat of 1's (representing soldiers) and 0's (representing civilians). The soldiers ......
leetcode-1342-easy
Number of Steps to Reduce a Number to Zero Given an integer num, return the number of steps to reduce it to zero. In one step, if the current number i ......
leetcode-1360-easy
Number of Days Between Two Dates Write a program to count the number of days between two dates. The two dates are given as strings, their format is YY ......
leetcode-766-easy
Toeplitz Matrix Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top ......
leetcode-806-easy
Number of Lines To Write String You are given a string s of lowercase English letters and an array widths denoting how many pixels wide each lowercase ......
leetcode-812-easy
Largest Triangle Area Given an array of points on the X-Y plane points where points[i] = [xi, yi], return the area of the largest triangle that can be ......
leetcode-830-easy
Positions of Large Groups In a string s of lowercase letters, these letters form consecutive groups of the same character. For example, a string like ......
leetcode-844-easy
Backspace String Compare Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace c ......
leetcode-944-easy
Delete Columns To Make Sorted You are given an array of n strings strs, all of the same length. The strings can be arranged such that there is one on ......
代码随想录算法训练营Day01 | LeetCode704 二分查找、Leetcode27 移除元素
今日学习的视频和文章 代码随想录数组基础 复习基础知识 代码随想录 二分查找 代码随想录 移除元素 LeetCode704 二分查找 题目链接:704. 二分查找 - 力扣(Leetcode) 以前学二分查找的时候,真的一直搞不清楚怎么操作左边界和有边界,以及循环的终止条件是什么,总是自己慢慢调试出 ......
leetcode_打卡04
leetcode_打卡04 题目:605. 种花问题 解答: 三种情况: 第一个1的左边全是0的情况,此时 可以插入的位置为result=(i-1+1)/2 ,如【0,0,0,1,0,0,1】 两个1之间全是0的情况。此时 可以插入的位置为result=(i-flag-1-2+1)/2 第一个1的右 ......
R语言:Some 'from' names in value not found on 'x' 报错
升级了dplyr后运行命令inter=inter %>% rename("gene"="V4") 就一直报错:Some 'from' names in value not found on 'x',如下所示: Error in rename(., gene = "V4") : Some 'from' ......
repository does not exist or may require 'docker login'
理论上从 docker hub 拉取镜像时是不需要的登录, 所以就只有一个原因: repository does not exist 仓库类型将私有改成公开 ......
Plugin 'maven-surefire-plugin:2.12.4' not found(已解决)
今天按照视频教程配置maven插件(maven-surefire-plugin)时,老师说这是maven内部的插件,可以不用写<groupId></groupId>标签,然后就报红:Plugin 'maven-surefire-plugin:2.12.4' not found 也就是说这个插件找不到 ......
LeetCode 周赛 340,质数 / 前缀和 / 极大化最小值 / 最短路 / 平衡二叉树
本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 [彭旭锐] 提问。 大家好,我是小彭。 上周跟大家讲到小彭文章风格的问题,和一些朋友聊过以后,至少在算法题解方面确定了小彭的风格。虽然竞赛算法题的文章受众非常小,但却有很多像我一样的初学者,他们有兴趣参加但容易被题目难度和大神选 ......
解决nvm升级node v18.14.0时/lib64/libm.so.6: version 'GLIBC_2.27' not found (required by node)问题
安装v18.14.0时的报错和解决方法 1.报错 [root@devops03 ~/.nvm]# nvm install v18.14.0 Downloading and installing node v18.14.0... Downloading https://npm.taobao.org/m ......
DotNetCore 提示 系统不支持“big5”编码。System does not support 'big5' encoding.
C# .NET Core 以 Big 5 (大五碼)編碼格式讀取檔案 (ruyut.com) C# .NET Core 以 Big 5 (大五碼)編碼格式讀取檔案 日期: 4月 27, 2022 之前在寫 C# .NET Framework 的時候要使用其他編碼格式很簡單,寫上編碼格式就可以了,但今 ......
人脸识别部分主机上提示无法加载DLL'DlibDotNetNative'的解决办法
开发人脸识别系统,调用了DlibDotNet ,系统在绝大部分主机上运行情况良好,而且DlibDotNet对系统的要求也不太高;测试过的主机,像工控主板 I3 3代 ,J1800 ,J1900,D525均无压力,轻松胜任; 而在有些客户的系统上,提示 System.DllNotFoundExcept ......
Pod Init Error: "force_encoding': can't modify frozen String (FrozenError)"
热烈欢迎,请直接点击!!! 进入博主App Store主页,下载使用各个作品!!! 注:博主将坚持每月上线一个新app!!! 我发现使用Xcode14新创建的新项目有这个问题,可以按照图中操作切换为Xcode13,解决此问题。 ......
LeetCode习题——有效的完全平方数(二分查找)
有效的完全平方数 力扣链接:367. 有效的完全平方数 题目 给你一个正整数 num 。如果 num 是一个完全平方数,则返回 true ,否则返回 false 。 完全平方数是一个可以写成某个整数的平方的整数。换句话说,它可以写成某个整数和自身的乘积。 不能使用任何内置的库函数,如 sqrt 。 ......
题解 CF1764G Doremy's Perfect DS Class (Extra)
题解 CF1764G Doremy's Perfect DS Class (Extra) 题意 交互库有一个 $1\sim n$ 的排列 $p$,你每次可以想交互库给定三个整数 $l,r,k(1\le l\le r\le n,1\le k\le n)$,交互库会返回 $\lfloor p_l/k\r ......
[LeetCode] 1440. Jump Game V 跳跃游戏之五
Given an array of integers arr and an integer d. In one step you can jump from index i to index: i + x where: i + x < arr.length and 0 < x <= d. i - x ......