39

Euclid's Game题解

这是一道~~比较简单~~的博弈论。 我们假设 $x \ge y$,那么此时可以分两种情况讨论: - $x using namespace std; #define int long long inline int read(){ int f=1,w=0; char c=getchar(); whil ......
题解 Euclid Game 39

[代码随想录]Day39-动态规划part07

## 题目:[70. 爬楼梯](https://leetcode.cn/problems/climbing-stairs/description/) ### 思路: 除了`dp[i] = dp[i-1] + dp[i-2]`还可以用完全背包的方法,可以放无数个1或者2,看有多少种排列(先背包后物品) ......
随想录 随想 代码 动态 part

CF1829H Don't Blame Me

[比赛链接](https://codeforces.com/problemset/problem/1829/H) # 题解 **知识点:线性dp,位运算。** 考虑设 $f_{i,j}$ 表示考虑了前 $i$ 个数字,与和为 $j$ 的方案数。转移方程显然。 注意初值为 $f_{0,63} = 1$ ......
1829H Blame 1829 Don CF

解决error: no matching member for call to 'connect'

在连接信号与槽时,报错解决`error: no matching member for call to 'connect'` - 原因 由于信号被重载过,同名了,但是参数不一样,就会报错。 这种情况下使用使用旧版语法 ``` connect(sender, SIGNAL(func()), recei ......
matching connect member error call

docker启动mysql报错Can't read dir of '/etc/mysql/conf.d/'

执行命令: docker run -p 3306:3306 --privileged=true -v /mysql/data:/var/lib/mysql -v /mysql/log:/var/log/mysql -v /mysql/conf:/etc/mysql-e MYSQL_ROOT_PASS ......
mysql 39 docker conf read

OperationError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Called in wrong state: have-remote-offer

webRTC报“OperationError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Called in wrong state: have-rem ......

pip install ale_python_interface 安装报错,ModuleNotFoundError: No module named 'ale_python_interface'——fatal error: ale_c_wrapper.h

参考: https://www.cnblogs.com/hasakei/p/10035198.html https://blog.csdn.net/senjie_wang/article/details/84073823 https://github.com/bbitmaster/ale_pytho ......

老代码报错:scipy.misc.imresize报错: AttributeError: module 'scipy.misc' has no attribute 'imresize'

运行老代码报错: image = misc.imresize(image, [Config.IMAGE_HEIGHT, Config.IMAGE_WIDTH], 'bilinear')AttributeError: module 'scipy.misc' has no attribute 'imre ......
imresize scipy misc 39 AttributeError

FTP权限问题解析,553 Can't open that file: Permission denied

FTP权限问题解析,553 Can't open that file: Permission denied FTP上传文件,提示553 Can't open that file: Permission denied 原因: 目录的所属组,所属用户属于root, 导致FTP无法上传, 修改组和所属用户 ......
Permission 权限 denied 问题 open

Mysql projects表`status` int DEFAULT NULL COMMENT '项目状态:1未开始,2进行中,3已完成,4搁置,5已结项',根据status计算每种状态个数

要根据MySQL中projects表的status字段计算每种状态的数量,你可以使用`GROUP BY`和`COUNT`函数进行分组和计数。 以下是一个示例的查询语句: ```sqlSELECT status, COUNT(*) as countFROM projectsGROUP BY statu ......
状态 status 个数 projects DEFAULT

Educational Codeforces Round 138 (Rated for Div. 2) B. Death's Blessing

这是一个电脑游戏,$n$ 个怪物排成一行,第 $i$ 个怪物的血量为 $a_i$ 并且它的亡语强度为 $b_i$ 。规则是: * 玩家每秒可以削减一只怪物的一点血量。 * 第 $i$ 只怪物死亡后会释放亡语,它两侧的怪物血量会得到 $b_i$ 的增幅血量。边界上的怪物只能对它的邻居进行亡语增幅。 * ......
Educational Codeforces Blessing Death Round

No module named 'sklearn'解决方案

sklearn深度学习库官方网站,打开之后按需复制命令进行安装,此处只列出两个最常用的: windows下pip安装: pip install -U scikit-learn Linux下pip安装: pip3 install -U scikit-learn windows/linux下conda安 ......
解决方案 sklearn 方案 module named

weblogic-10.3.6-'wls-wsat'-XMLDecoder反序列化漏洞-(CVE-2017-10271)

[toc] | 说明 | 内容 | | | | | 漏洞编号 | CVE-2017-10271 | | 漏洞名称 | Weblogic 其中使用了XMLDecoder来解析用户传入的XML数据在解析的过程中出现反序列化漏洞,导致可执行任意命令 | | 修复方案 | 打补丁上设备升级组件 | ### ......
序列 XMLDecoder 漏洞 weblogic wls-wsat

weblogic-10.3.6-'wls-wsat'-XMLDecoder反序列化漏洞-(CVE-2017-10271)

[toc] | 说明 | 内容 | | | | | 漏洞编号 | CVE-2017-10271 | | 漏洞名称 | Weblogic 其中使用了XMLDecoder来解析用户传入的XML数据在解析的过程中出现反序列化漏洞,导致可执行任意命令 | | 修复方案 | 打补丁上设备升级组件 | ### ......
序列 XMLDecoder 漏洞 weblogic wls-wsat

Codeforces Global Round 24 B. Doremy's Perfect Math Class

给一个元素个数为 $n$ 的正整数集合 $S$ ,可以做以下操作任意次: * 选择 $S$ 中的两个元素 $x$ $y$ 满足 $x > y$ 且 $x - y$ 不在集合内。 * 加入 $x - y$ 到集合。 经过若干次操作后,集合中最多能存在多少元素。 性质一:两个数 $x$ $y$ 辗转相减 ......
Codeforces Perfect Global Doremy Class

Hello 2023 B. MKnez's ConstructiveForces Task

构造一个数组 $a_1, a_2, \cdots, a_n$ 满足以下条件 * $\forall i \in[1, n],\ a_i \neq 0$ 。 * $\forall i \in [1, n - 1], a_i + a_{i + 1} = \sum_{i = 1}^{n} a_i$ 。 显然 ......
ConstructiveForces Hello MKnez 2023 Task

$('.panel-collapse').on('show.bs.collapse', function () {})详解

`$('.panel-collapse').on('show.bs.collapse', function () {});` 这段代码是在使用 jQuery来绑定事件。 - `$('.panel-collapse')`部分是一个选择器,它选择了当前页面上所有有`panel-collapse`这个类的 ......
collapse 39 panel-collapse function panel

安装weditor时提示“ UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: illegal multibyte sequence”

问题: 安装weditor时提示“ UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: illegal multibyte sequence” 解决 : 方法一:解决方法一设置用户或者系统变量: 方法二:设置 ......

【题解】CF1852A Ntarsis' Set

考虑我们先手模一下样例: $$ \begin{cases} 1&3&5&6&7\\ 2&8&10&11&12\\ 4&13&15&16&17 \end{cases} $$ ???一脸疑惑,有什么规律吗?真有,但是很难看出来捏。 正难则反,我们考虑如果知道操作一次后一个数的位置,我们可以很容易推出,操 ......
题解 Ntarsis 1852A 1852 Set

AGC064_A i i's

# AGC064_A **i i's** ## [题目传送门](https://atcoder.jp/contests/agc064/tasks/agc064_a) ## 题意 给定$n$,请构造一个长度为$n*(n+1)/2$的序列, 使得$1,2,3...n$中的任意一个数 $x$ 刚好出现$x ......
AGC 064 39

删除文件报错rm: cannot remove `auditcommand.log': Operation not permitted

删除文件报错 [root@db1 log]# rm -rf auditcommand.log rm: cannot remove `auditcommand.log': Operation not permitted lsattr查看属性 [root@db1 log]# rm -rf auditco ......

Python中单引号(')、双引号(")、花括号 {}的用法及注意事项

在Python中,字符串可以用单引号(')或双引号(")括起来,它们在用法上没有本质区别。你可以根据个人偏好来选择使用单引号或双引号来创建字符串。 例如: 使用单引号括起的字符串: print(f'Find "world" at index {index}') 使用双引号括起的字符串: print( ......
引号 括号 注意事项 事项 Python

遇到的错误之“Could not copy property 'repositoryId' from source to target; nested exception is java.lang.reflect.InvocationTargetException”

[ERROR][2023-09-03 21:54:10] | Combination收入费用数据导出异常 org.springframework.beans.FatalBeanException: Could not copy property 'repositoryId' from source ......

Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException 转载哈!!

2023-09-03 22:53:53.622 WARN 20788 [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling ......

2023.9.3 hpz's problems about trees

#### P2664 树上游戏 对于颜色 $c$,如果我们把颜色 $c$ 的点全部都删除,那么我们会得到若干个连通块。 连通块里面的路径是没有贡献的,连通块联通外面的路径都会有这个颜色做了贡献。 对于一个连通块,其里面所有点都能有 $n-siz(连通块)$ 的贡献。 如果我们每次枚举颜色,再计算连通 ......
problems about trees 2023 hpz

leetcode题库39.组合总和——递归 穷举

class Solution: def combinationSum(self, candidates, target): res,ans=[],[] def findpath(candidates): if sum(ans)==target: res.append(ans.copy()) retu ......
题库 总和 leetcode 39

代码随想录算法训练营第二十七天| 39. 组合总和 40.组合总和II 131.分割回文串

39. 组合总和 卡哥建议:本题是 集合里元素可以用无数次,那么和组合问题的差别 其实仅在于 startIndex上的控制 题目链接/文章讲解:https://programmercarl.com/0039.%E7%BB%84%E5%90%88%E6%80%BB%E5%92%8C.html 视频讲解 ......
总和 随想录 回文 训练营 随想

What's the best approach for generating a new API key?

https://stackoverflow.com/questions/14412132/whats-the-best-approach-for-generating-a-new-api-key Edit: I've spoke to a few friends (email/twitter) an ......
generating approach What best API

剑指 Offer 39. 数组中出现次数超过一半的数字(简单)

题目: ![](https://img2023.cnblogs.com/blog/2679751/202309/2679751-20230903100813764-1579439104.png) ``` class Solution { public: int majorityElement(vec ......
数组 次数 数字 Offer 39

未预期的符号`('附近有语法错误--九五小庞

首先遇到的坑如下/bin/sh: 1: Syntax error: “(” unexpected这是因为默认了dash我们要让系统不默认dash,先检查一下,如果默认的选项时dash那就把他否掉!然后又报错了说我符号有错,如标题所述经过我一番考究,原来是我起名字时起了个(main),不能用括号来组成 ......
语法 符号 错误 39