solution p9194 the of
Length of Last Word
Given a string s consisting of words and spaces, return the length of the last word in the string. A word is a maximal substring consisting of non-spa ......
solve the problem of downloading assets from github
Description After version 2021a, in order to reduce the file size, Webots set resource files such as textures and sounds up for network download by gi ......
virtualBox 报VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DI的错误
背景:主机是ASUS主板 操作系统是deepin20.0系统,需要安装win10,下载virtual box和win10镜像iso,virtualbox设置完后,启动win10,virtualbox报错VT-x is disabled in the BIOS for both all CPU mod ......
[USACO06FEB]Treats for the Cows G/S
# [[USACO06FEB]Treats for the Cows G/S](https://www.luogu.com.cn/problem/P2858 "[USACO06FEB]Treats for the Cows G/S") ## 题目描述 FJ has purchased N (1 us ......
Java流程控制——the next day
用户交互Scanner Next和NextLine Java5的新特性,带来了java.util.Scanner类,提供了人机交互的作用。我们可以通过它获取用户的输入。 public class Demo2 { public static void main(String[] args) { Sca ......
2341.maximum Number of Pairs in Array
问题描述 2341. 数组能形成多少数对 (Easy) 给你一个下标从 0 开始的整数数组 nums 。在一步操作中,你可以执行以下步骤: 从 nums 选出 两个 相等的 整数 从 nums 中移除这两个整数,形成一个 数对 请你在 nums 上多次执行此操作直到无法继续执行。 返回一个下标从 0 ......
最好的Transformer讲解:The Illustrated Transformer + The Annotated Transformer
The Illustrated Transformer https://jalammar.github.io/illustrated-transformer/ The Annotated Transformer http://nlp.seas.harvard.edu/annotated-transf ......
Chain-of-Thought Prompting in Large Language Models 论文学习
一、Chain-of-Thought Prompting研发背景 因为LLM,NLP的格局最近发生了革命性的变化,同时。扩大语言模型的规模已经被证明可以带来一系列好处,例如改进的性能和样本效率。然而事实证明,仅扩大模型大小依然存在一些局限性,在诸如 算术 常识 符号推理 实时数据获取 代码模拟执行 ......
send it failed() The virtual circuit was reset by the remote side executing a hard or abortive close. (连接被对方重置)
串口调试助手报错提示 The virtual circuit was reset by the remote side executing a hard or abortive close. for upd socket ,the remote host was unable to deliver ......
[LeetCode] 2475. Number of Unequal Triplets in Array
You are given a 0-indexed array of positive integers nums. Find the number of triplets (i, j, k) that meet the following conditions: 0 <= i < j < k < ......
Qt报错:call to constructor of '_ConfigDaoImpl' is ambiguous
# Qt报错:call to constructor of '_ConfigDaoImpl' is ambiguous ## 原因 ```shell configform.cpp:4:13: error: call to constructor of '_ConfigDaoImpl' is ambi ......
[ABC305C] Snuke the Cookie Picker题解
# 题目大意 有一个 $H\times W$ 的网格,一种有一个矩形,矩形中间有一个点被挖空,求这个点的坐标。(. 表示空白,# 表示矩形内的点) # 解析 观察我们可以发现,每一矩形内的个点上下左右至少会有两个是 #。 如图:  #### 解决思路 由题意可得 $ak \le size \le bk$,因此当条件不符合该要求时即可退出 因为 $size \le bk$,因此,我们可以假设每行都是 $b$ 长度来满足条件二 ......
The XOR Largest Pair
```cpp #include #include #include #include #include using namespace std; int bit[32]; int n, num[5211314]; struct Trie { int trie[5211314][2], tot = 1 ......
Solution Set - LCT
A[洛谷P3690]维护一个森林,支持询问路径xor和,连边(已连通则忽略),删边(无边则忽略),改变点权。 B[洛谷P3203]$n$个装置编号为$0,...,n-1$,从$i$可以一步跳到$i+k_i$,支持修改$k_i$,询问从一个点开始几步跳出$n-1$。 C[洛谷P2486]给定一棵树,点 ......
forEach、for in、for of三者区别
1、forEach更多的用来遍历数组 var arr = [23, 9, 78, 6, 45] arr.forEach((item) => { // console.log(item) item = 'cc' }) 2、for in 一般常用来遍历对象或json【循环出的是key】 // var o ......
媳妇的眼泪 Tears of daughter in law
《媳妇的眼泪》是由罗福执导、罗灿然、东函编剧,俞小凡、谢祖武、王灿主演的年代爱情剧。 该剧改编自台湾华视电视剧《惊世媳妇》,讲述了温婉贤良的女主角林婉茹嫁进高家后就惨遭婆家刁难的故事。 该剧于2007年在四川电视台影视文艺频道播出 清末民初,婉茹(俞小凡饰)一家开了家老林豆铺,生活简单幸福,可由林父 ......
git问题:remote: [session-584b73b2] Access denied... The requ ested URL returned error: 403
error 403是服务器拒绝了终端的访问,是账户密码的问题,是因为git客户端缓存了错误的密码。 我是原来有个git账户,使用https方式,密码永久保存的方式,在操作另一个git账户时可能更新了缓存密码。 方法: 使用git clone http://username:password@gite ......
Jmeter:"An error occurred: Can't connect to X11 window server using 'lacalhost:12.0' as the value of the display variable." 解决办法
做各种不同项目的性能测试,都需要在项目本地压测服务器配置jmeter,需要时还要调出jmeter图形化界面来调试jmeter脚本。 标题中的问题遇过多次,这次做个记录。 1. 启动jmeter报错 在配置好jmeter环境变量的linux系统执行jmeter命令,报错如下: [root@localh ......
Solution Set - “伸手向着拉格朗日点作别”
[TOC] $$ \mathbb{Defining~\LaTeX~macros\dots} \newcommand{\oreq}[0]{\overset{\lor}{\gets}} $$ Umm… UOJ 浓度极高的一个 sol set. 摘的标题和上一个 sol set 是姊妹篇! ## 0.「U ......
default-scheduler running PreBind plugin "VolumeBinding": binding volumes: timed out waiting for the condition
看openebs-localpv-provisioner 和kube-scheduler-minikube 和kube-controller-manager-minikube的报错信息,就发现了问题 volumeClaimTemplates: - metadata: name: proxysql-d ......
How to Clear Logs of Running Docker Containers
How to Clear Logs of Running Docker Containers https://www.howtogeek.com/devops/how-to-clear-logs-of-running-docker-containers/ Understanding the Prob ......
Luogu P3435 [POI2006] OKR-Periods of Words
# [POI2006] OKR-Periods of Words ## 题面翻译 对于一个仅含小写字母的字符串 $a$,$p$ 为 $a$ 的前缀且 $p\ne a$,那么我们称 $p$ 为 $a$ 的 proper 前缀。 规定字符串 $Q$(可以是空串)表示 $a$ 的周期,当且仅当 $Q$ 是 ......
「Solution Set」 6.11
我今天摆了一天捏。 晚上写点什么证明不是一整天捏。 ## P8499 [NOI2022] 挑战 NPC Ⅱ 我会树哈希吗?? 我们发现包里匹配就行了,因为他们讲根节点是一样的。所以从根节点开始匹配就是如果哈希值一样的节点,那直接匹配上不亏。如果不一样的数量很多,那一定不行。如果在 $K$ 以内,我们 ......
UVA1401 Remember the Word
## 思路 首先有一个比较朴素的 DP 就是记 $f_i$ 为 $s$ 的从第 $i$ 个字符开始到字符串结尾的划分方案数,记模板串的集合为 $T$,$s$ 从第 $i$ 个字符开始到字符串结尾的子串为 $s(i)$,那么不难写出方程: $$ f_i = \sum f_{i + \operatorn ......
定冠词the的习惯用法
①某家人或某夫妇一般用the+复数。如:the Smiths。 ②表示整个民族或族人一般加the。如 the Chinese/English。 ③少数山脉群岛也不用the。如Mount Tai。如名词中有of短语则一般有the.如:the Mountain of seven sighs. ④中国的湖 ......
【每日一题】Problem 331C1. The Great Julya Calendar
[原题](https://codeforces.com/problemset/problem/331/C1) #### 解决思路 寻求减到 0 所需的最小次数,即 $Num(n) \Rightarrow Num(n-x)+1$ 当存在一个 x 使得 (n - x)% 10 = 0 时,那么(n - ......
算法刷题记录:P1518 [USACO2.4]两只塔姆沃斯牛 The Tamworth Two
###题目链接: https://www.luogu.com.cn/problem/P1518 ###题目分析 这道模拟题很典型了,给定了一个**固定的移动方式,去模拟即可**, 该题说:如果牛和农夫永远不会相遇输出0,我没想到很好的方法,不推荐我这样的写法。 算勉强AC吧。 ###AC代码 ``` ......
Solution Set - 限时训练 II
## HNOI2017 Day2 2023-06-10 注:Day2T2换为BJOI2017Day2T1,以匹配学习进度 - A.[大佬](https://www.luogu.com.cn/problem/P3724) - B.[抛硬币](https://www.luogu.com.cn/probl ......