solution family sets of
[CF839E] Mother of Dragons
最优方案一定是选择一个团,并在团里平均分配点权。 实际上,定义一个点 \(u\) 的权重 \(w_u\) 为 \(\sum\limits_{(u,v)}s_v\),那么如果方案中 \(w_x>w_y\),将 \(y\) 去掉并将其点权加在 \(x\) 上一定更优,所以答案一定会被调整成一个团。 对于 ......
vscode settings.json
{ "workbench.startupEditor": "none", "workbench.iconTheme": "vscode-icons", "workbench.colorTheme": "Dracula", "window.title": "${rootName}${separator ......
Solution Set 2023.12.12
ABC332G Not Too Many Balls 可以转化为最大流模型,设节点 \(x_i\) 代表第 \(i\) 种球,\(y_j\) 代表第 \(j\) 个盒子。考虑如下建边方案: \(S \rightarrow x_i\),容量为 \(A_i\) \(x_i \rightarrow y_j ......
pure-admin pnpm ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm
事情是这样的,用的开源pure-admin 的框架,用的是pnpm,本地环境都是可以的,但是发布到生成就报以下错误 然后看部署参数,是这样的,强制用了lock文件,本来也没问题 报错的意思是json 文件跟pnpm-lock.json 文件不匹配 但是本地看着是匹配的,随便挑选几个包版本看着也是一致 ......
The Zen of Python
The Zen of Python The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Com ......
ElasticSearch之Node query cache settings
对于filter查询,ElasticSearch提供了缓存查询结果的特性,当缓存中存在满足查询条件要求的数据时,直接从缓存中提取查询结果。 对于ElasticSearch节点,该节点上的所有shard共享同一个缓存区域。 ElasticSearch基于LRU算法来管理缓存中的数据,当空间不足以承载最 ......
Redis命令整合(四) Set型
集合类型。元素各不相同没有顺序 1.添加元素 sadd [keyName] [member1] [member2]... eg: sadd letters a b c 2.删除元素 srem [keyName] [member1] [member2]... eg srem letters a b 3 ......
[QOJ1359] Setting Maps
题目链接 \(k=1\) 的时候显然是最小割。把一个点 \(u\) 拆成 两个点,中间连流量为 \(c_u\) 的边。 那么考虑扩展到 \(k\) 更大的情况。把上图的每个入点和出点都拆成 \(k\) 个。把节点 \(u\) 第 \(i\) 层入点和第 \(i+1\) 层入点连接,再把第 \(i\) ......
测试类注入Bean失败,Could not autowire, No bean of 'XxxService' type found
Spring Boot 2.2 是第一个正式支持 JUnit 5 的版本。 因此在写测试类的时候,JUnit4和JUnit5是有一点区别的。JUnit4需要需要两个注解 @SpringBootTest @Runwith(SpringRunner.class) Junit5的测试类则只需要一个注解 @ ......
Pfaffian And Determinant of $\sum A_iz^i$
// created on 23.12.11 目录Pfaffian And Determinant of \(\sum A_iz^i\) Pfaffian And Determinant of \(\sum A_iz^i\) 求斜对称矩阵的 Pfaffian 即 \(\mathrm{Pf}(A)\) ......
题解 QOJ1359【Setting Maps】 / accoders::NOI 5682【apers】
https://qoj.ac/contest/506/problem/1359 problem 给定一张大小为 的有向图 。现在告诉你敌军大本营在节点 \(s\) 和友军基地在节点 \(t\)。你需要在每个点上放置一定数量的APERS bounding mine来杀伤敌方步兵。 为了达成战术效果,你 ......
The subtleties of proper B+Tree implementation
Ref https://ayende.com/blog/198241-B/the-subtleties-of-proper-b-tree-implementation ......
C. Removal of Unattractive Pairs
这道题很考验思维。 这道题目我们只需要考虑出现次数最多的字符的个数,分两种情况讨论。 1、如果该字符出现次数超过n/2(这里设为x),那么其他字符和该字符凑成一对进行消除,即剩下的长度为2x-n。 2、如果该字符出现次数低于n/2,那么对于任意字符都有足够的其余字符和他凑成一对进行消除,那么就变成了 ......
Go的Set实现
Go的Set实现 由于Go的内置集合中没有Set的实现,可以用map[type]struct{} 要求: 1、元素的唯一性 2、基本操作:添加、删除、判断是否存在、统计元素数量 3、可遍历集合 //声明Set type Set struct { //利用map,实现的Set集合 mapSet map ......
20.Explain how the following reasoning fails to address the complexity of the issue involved, and rebut it. “Sanya is warm all year round and has beautiful beaches,
Round 1: Identifying the Failure in Reasoning Speaker 1 (Student A): Hello, everyone! Let's kick off our discussion by examining the reasoning: "Sanya ......
15.Please retell the parable of The Blind men and An Elephant. What is the moral of the parable? What can we learn from the parable when it comes to critical thinking?
Round 1: Retelling the Parable and Extracting the Moral Speaker 1 (Student A): Hey everyone! So, let's dive into the parable of "The Blind Men and the ......
16.What are the basic elements of an argument according to Toulmin Model? How do you evaluate evidences with the intellectual standards?
Round 1: Understanding the Basic Elements of Toulmin Model Speaker 1 (Student A): Hello, everyone! Let's start by discussing the basic elements of the ......
12.How do you understand the three “C”s(Concise,Clear & Coherent)in an academic Abstract writing?Why are they so important and worthy of a careful study?
Round 1: Understanding the Three "C"s in Academic Abstract Writing Speaker 1 (Researcher A): Greetings, everyone. Today, we're delving into the signif ......
mysql set column default value as sha2(uuid(),512) ,length() measured sha2(uuid(),512) 's size is 128,
mysql> select @@version; + + | @@version | + + | 8.0.35-0ubuntu0.23.04.1 | + + 1 row in set (0.00 sec) mysql> create table t4(id bigint unsigned auto_ ......
mysql set column sha2(uuid(),512) as column default value via trigger
mysql> show create table t3; + + + | Table | Create Table | + + + | t3 | CREATE TABLE `t3` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `create_tim ......
A sample of JSON RPC service
This is a sample service program which show how to implement a JSON RPC. The RPC service included two functions which used for RSA sign and verify. If ......
【JavaSE】集合Collection{List(ArrayList, LinkedList), Set(TreeSet, HashSet, LinkedHashSet)} + Map(HashMap, TreeMap, LinkedHashMap)
集合体系;
单列集合Collection{List(ArrayList, LinkedList), Set(TreeSet, HashSet, LinkedHashSet)};
双列集合Map(HashMap, TreeMap, LinkedHashMap);
单列集合和双列集合的遍历方式;
单列集... ......
CF1894E Freedom of Choice
CF1894E 数据范围多少有点诈骗 首先考虑 \(m=1\) 的情况 容易发现这个 \(l_i,r_i\leq 10^{17}\) 不是很对劲,因为直觉上感觉如果区间可取范围过大答案就是 \(0\) 我们可以取一个不是那么严格的限制条件来约束他,当 \(r-l>n\) 时,答案肯定是 \(0\)。 ......
maven 配置(cmd 黑窗口执行 mvn 时默认的 settings 文件和 idea maven 相关配置)
写在前面: 本文章用于记录博主平时遇到的问题,步骤略粗糙,目的在于记录一边后续博主自己查找,如果能帮助到其他人更好。文章中用到的链接均为自行引入,侵删,谢谢(2I2Rc*@JY8) 问题说明:在一次使用 cmd mvn 命令通过下载到本地的第三方 jar 包(ojdbc8.jar)创建本地 mave ......
ElasticSearch之Shard request cache settings
对于查询操作,Elasticsearch提供了缓存特性来暂存结果。 对于相同条件的查询请求,在缓存中的数据失效前,响应后续的查询操作时可以直接从缓存中提取结果,有效降低检索操作的时延,提升检索数据时的体验。 提到缓存相关的特性,即要关注如下几点: 缓存的开关 缓存中的数据哪里来 缓存占用的空间 缓存 ......
Solution Set #3
紧急更新。 上 OI-transit 上加训构造,感觉 OI-transit 是很好的找题网站。 25 loj6736. 「2020 集训队论文」最小连通块 应该加个部分分:DFS 序是 \(1\sim n\)。 你考虑这个部分分怎么做。一种做法是剥叶子,每次找到一个叶子的父亲。存在判断一个点是否是 ......
Redis报错:(error) DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user
一、报错内容 (error) DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user. In this mode c ......
Redis报错:WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128
报错内容: 1:C 08 Dec 2023 05:47:33.348 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 08 Dec 2023 05:47:33.348 # Redis version=7.0.5, bits=64, commit ......