struct typedef and

Desertification in China: Causes and Effects

Research show that currently, 27.4% of land in China has undergone desertification affecting about 400 million people. Studies are increasingly focusi ......
Desertification Effects Causes China and

CF1886D Monocarp and the Set

Questions Monocarp 有 \(n\) 个整数和一个集合,他需要把这 \(n\) 个数添加到集合中,每次添加一次 除了第一次,每次添加元素都会输出一个字符 如果当前添加的元素比原有的元素都要小,那么输出 \(>\) 如果当前添加的元素比原有的元素都要大,那么输出 \(<\) 否则输出 ......
Monocarp 1886D 1886 and Set

Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools

(base) cloud@Robot bin % flutter doctor --android-licenses Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline- ......
Android cmdline-tools sdkmanager the cmdline

CF1881D Divide and Equalize

solution \(a_i\) 和 \(a_j\) 在操作前后的乘积是不变的,也就是总乘积是固定的。最后要求所有的元素相同,那也就是说所有元素的乘积 \(total\) 一定满足 \(\sqrt[n]{total}\) 是整数。看了看数据范围没有办法直接乘起来,于是考虑分解质因数,最后看一下每个质 ......
Equalize Divide 1881D 1881 and

[AGC030F] Permutation and Minimum 题解

Permutation and Minimum 看到 300 的数据范围,再加上计数题,很容易就往计数 DP 方向去想。 为方便,我们将 \(n\) 乘二。 因为是两个位置取 \(\min\),于是我们便想到从小往大把每个数填入序列。于是DP数组第一维的意义便出来了:当前已经填入了前 \(i\) 小 ......
题解 Permutation Minimum 030F AGC

CF261D Maxim and Increasing Subsequence 题解

Maxim and Increasing Subsequence 首先,我们可以发现,当这个重复次数很大的时候,答案就等于序列中出现的不同权值个数。实际上,这个“很大”就可以被当作“大于等于不同权值个数”。 不同权值个数实际上是 \(\min(n,m)\) 级别的,其中 \(n\) 是序列长度,\( ......
题解 Subsequence Increasing Maxim 261D

CF979E Kuro and Topological Parity 题解

Kuro and Topological Parity 我们考虑在一张染色完成的图里,我们连上了一条边,会有何影响? \(\bullet\) 在同色节点间连边——明显不会有任何影响。 \(\bullet\) 在异色节点间连边,但是出发点是个偶点(即有偶数条路径以其为终点的节点),终点的路径数增加了, ......
题解 Topological Parity 979E Kuro

CF908D New Year and Arbitrary Arrangement 题解

New Year and Arbitrary Arrangement 思路: 期望题果然还是恶心呀! 我们设 \(f[i][j]\) 表示当串中有 \(i\) 个 \(a\) 和 \(j\) 个 \(ab\) 时的方案数。为了方便,设 \(A=\dfrac{P_a}{P_a+P_b},B=\dfra ......
题解 Arrangement Arbitrary 908D Year

Maximums and Minimums (CF E)

思路: 分别求出 最小区间 和最大区间, 利用单调zai 处理即可 然后 在利用 调和级数 , 求最小值的倍数 后记: 为什么我不2个元素都求一个区间呢? ......
Maximums Minimums and CF

Prefixes and Suffixes (CF D) (字符串翻转找性质)

思路: 利用操作 使得题目更好分析, t 的后缀,反转t , 来看t 的前缀, 实际操作的时候, 把s 和 t 的前缀在反转一下进行交换就可以了, 发现性质 1 C(si, ti) 他们的相对位置不会变化, 一直是匹配的 然后利用 翻转的性质, 一定会产生任意我想要的排列 (从后开始构造, 先把目标 ......
字符串 字符 Prefixes Suffixes 性质

struct 结构体【GO 基础】

虽然 Go 语言中没有“类”的概念,也不支持“类”的继承等面向对象的概念,但是可以通过结构体的内嵌,再配合接口,来实现面向对象,甚至具有更高的扩展性和灵活性。那么本文就将详细看下怎么使用结构体。 ......
结构 基础 struct

2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules) N. Waste Sorting

有五种种类的垃圾,数量分别为 \(a_1, a_2, a_3, a_4, a_5\) 。 第一种为纸质垃圾 第二种为塑料垃圾 第三种双非垃圾 第四种基本纸质垃圾 第五种基本塑料垃圾 有三种垃圾桶,容量分别为 \(c_1, c_2, c_3\) 。 第一种垃圾桶可以放入:纸质垃圾和基本纸质垃圾 第二种 ......
ICPC Southern Regional Contest Russian

微信支付 Verify the signature and get the Wechatpay certificate corresponding to serialnumber[X] is empt

1.先获取商户证书文件这块叫商户证书需要和下面的支付证书名字区分 在微信开放平台里面下载商户证书,用apiclient_cert.pem取获取'商户证书的序列号' 证书查看 2.需要下载一个jar,生成微信证书时候用Releases · wechatpay-apiv3/CertificateDown ......

[AGC001D] Arrays and Palindrome 题解

非常有意思的思维题。 首先我先瑞平一下翻译,我根本没看懂,还是去看英文题面看懂的。 首先可以发现整个字符串被拆成了若干个奇回文串与偶回文串。现考虑如何判是否合法。可以发现一个回文串就是要求部分位置匹配。我们对这些匹配的位置建边,如果得到的图是联通的,那么就只能填入 \(1\) 种字符,否则就可以填入 ......
题解 Palindrome Arrays 001D AGC

机器学习经典教材《模式识别与机器学习》,Pattern Recognition and Machine Learning,PRML官方开放免费下载

微软剑桥研究院实验室主任Christopher Bishop的经典著作《模式识别与机器学习》,Pattern Recognition and Machine Learning,简称PRML,被微软“开源”了。 本书介绍&下载页:(书的介绍页面) https://www.microsoft.com/e ......
机器 Recognition Learning 教材 Pattern

struct.error: 'H' format requires 0 <= number <= 65535

全部代码如下: from pymodbus.client import ModbusTcpClient # 避坑:write_registers和write_register函数差一个s。多一个s的参数用整型列表,没有的只能用整型 def split_float_to_integer_and_fra ......
requires struct format number error

赛·码·niang(not impotant and not good)

模拟赛题解以后就发在这里了 2023.10.5 CSP模拟49 ltx这场太恶心了,生理上的那种,看见要模一个大质数我就知道这题要完,这种题连暴力都tmd没法打,随便糊点分出来算了 T1 模板题 额……过 T2 THUSC 排序,两个分值,分值确定,但是分值的权值不定,让求求在不同权值下有多少种排名 ......
183 not impotant niang good

Unity完美像素Sprite:怎么让图片变得清晰(转载) Unity Pixel Perfect Sprite: How To Achieve Crispy And Sharp Images

https://gamedevelopertips.com/unity-pixel-perfect-sprite/ So I was making a little prototype for my new game when I just came across a little problem. ......
Sprite Unity 像素 Perfect Achieve

1——of C++ and Java togather

因为那个C++最全的笔记是从第18课开始做(笔者说18课之前都很基础),所以这里就对前18课的知识做个笔记总结 C++的工作过程 这里提到的C++工作过程主要涉及两个:编译与链接 之前考研时候学到,(在组成原理的某个章节),计算机的工作过程其实就涉及 “将源程序转换成可执行文件”,与其中便有许多雷同 ......
togather Java and

CodeTON Round 5 ( Div1+Div2 ) C. Tenzing and Balls (DP)

CodeTON Round 5 ( Div1+Div2 ) C. Tenzing and Balls 思路:设f[i]为从 1~i 能删去的最多数 f[i] = max( f[i-1] , i - j + 1+ f[j-1] ) ( a[j]=a[i] , 删去i到j , 再加上前 j-1 可删去的 ......
Div CodeTON Tenzing Balls Round

npm package and peerDependencies All In One

npm package and peerDependencies All In One 组件库复用 peerDependencies dependencies & devDependencies & optionalDependencies ......
peerDependencies package npm and All

题解: CF768D Jon and Orbs

题解: CF768D Jon and Orbs 一句话体面:有k种不同的物品,每天等概率任取一种(不一定是新的种类)。q组询问,每组给出一个p,问取完这k件物品的概率不小于\(\frac{p}{2000}\)的最小天数 不用说,肯定是概率DP了 1.定义 :\(f_{i,j}\) 表示前\(i\)天 ......
题解 768D Orbs 768 Jon

CF1842G Tenzing and Random Operations 题解

题意 给定一个长度为 \(n\) 的正整数序列 \(a\),对该序列进行 \(m\) 次操作,定义每次操作如下: 从 \(\left[1, n\right]\) 中等概率选取一个 \(i\),对于 \(j \in \left[i, n\right]\),执行操作 \(a_j \leftarrow a ......
题解 Operations Tenzing Random 1842G

[CF1394D] Boboniu and Jianghu

D - Boboniu and Jianghu 设\(dp[i][0/1]\)表示当前链从下往上是不增/减的,那么当\(u\)与\(v\)(其中\(fa[v]=u\))的\(b\)不相同时,\(dp[v][0/1]\)的第二维转移的状态是确定的,否则就是不确定的,这时直接强制其取\(0\),然后向每 ......
Boboniu Jianghu 1394D 1394 and

kubernetes PodSecurityPolicy set to runAsNonRoot, container has runAsNonRoot and image has non-numeric user (appuser), cannot verify user is non-root

该错误的唯一原因是。根据源代码中的注释,我们需要设置一个数字用户值。 securityContext: runAsUser: 999 ......

[Typescript] Type and Interface for performance

Let's say you're creating a component that has all the props of input but needs to add a label prop. You'll need to extend from the ComponentProps typ ......
performance Typescript Interface Type and

MongoDB Node.js Driver and MongoClient All In One

MongoDB Node.js Driver and MongoClient All In One ......
MongoClient MongoDB Driver Node All

Codeforces Round 891 (Div. 3) F. Sum and Product(数论+map)

Codeforces Round 891 (Div. 3) F. Sum and Product 思路:对于x,y:ai+aj=x —> aj=x-ai 因此 ai*(x-ai) = y ——> ai = (x 土 sqr( x^2 - 4y ) ) /2 对应的 ai 就是要的两个值 若两个值不同 ......
数论 Codeforces Product Round 891

C#教程 - 元组与解构(Tuples and Deconstruction )

C#教程 - 元组与解构(Tuples and Deconstruction ) 更新记录转载请注明出处:2022年9月24日 发布。2022年9月10日 从笔记迁移到博客。 元组(tuples)说明# 注意:C# 7.0可用注意:元组不可以声明为静态类型作用:元组常用于传递和返回多个值;匿名类型可 ......
Deconstruction 教程 Tuples and

CF986C AND Graph

出题人纯nt要用bitset存bool数组来卡空间也真是没谁了 这题的思路其实有点像高维前缀和,考虑对于某个数\(x\),我们知道\(y=(2^n-1)\oplus x\)与\(x\)的与一定为\(0\),且\(y\)的所有子集也满足与\(x\)后为\(0\) 考虑怎么处理这种子集关系,我们借鉴于高 ......
Graph 986C 986 AND CF