monocarp and set the

AT_abc321_f [ABC321F] #(subset sum = K) with Add and Erase 题解

AT_abc321_f [ABC321F] #(subset sum = K) with Add and Erase 题解 题目大意 现在有一个空箱子。给你两个数 \(Q, K\),然后给你 \(Q\) 行,每一行代表一个操作: \(+ x\),即向箱子里加一个权值为 \(x\) 的小球。 \(- ......
题解 321 AT_abc subset Erase

Linux $PS1 and zsh All In One

Linux $PS1 and zsh All In One macOS 自定义命令行提示符 ......
Linux All PS1 One and

MongoDB and mongoose All In One

MongoDB and mongoose All In One Node.js ......
mongoose MongoDB All and One

1.单列集合(接口 Collection,List,Set)

单列集合(接口 Collection,List,Set) 单列集合体系结构: 特点: 1.List系列集合: 添加的元素是有序、可重复、有索引; 2.Set系列集合: 添加的元素是无序、不重复、无索引; 3.有序为存入和取出都是一样的顺序,非内部里的顺序; Collection 概念: Collec ......
Collection 接口 List Set

题解 CF1257G【Divisor Set】

problem 我们说一个集合 \(D\) 是一个好的集合,当不存在集合中的两个不同元素 \(a,b\) 使得 \(a\) 是 \(b\) 的约数。 给定一个超大整数的素数表示形式 \(N = \prod_{i=1}^n{p_i}\),要求从它的所有因子中选择尽可能多的元素组成一个好的集合。 问这个 ......
题解 Divisor 1257G 1257 Set

CF1842F Tenzing and Tree 题解

Tenzing and Tree 感觉很典型的题,就是树的重心+绝对值等式 解法: 以每个点 \(i\) 为根分别 \(bfs\) ,得到一个距离数组 \(dis\) ,取前 \(k\) 个值的权值为和,更新 \(w[k]\) 的值, \(n\) 个点分别为根,更新 \(n\) 遍之后,得到 \(w ......
题解 Tenzing 1842F 1842 Tree

P9013 [USACO23JAN] Find and Replace S

前言 这是考试的时候放的一道题,考的时候没做出来。 调了一个晚上,心态爆炸,故作此篇。顺便,鸣谢泥土笨笨大佬的题解,给我的代码提供了强有力的对拍参照。 正题 首先看到题目,虽然字符串长度不超过 \(10^5\),但是还是嫌多;再一看,至多只有52个字符。 那么从这个数据范围入手,思考可以按照变换前后 ......
Replace P9013 USACO 9013 Find

[CF1229E]Marek and Matching

This is a harder version of the problem. In this version, \(n \le 7\).Marek is working hard on creating strong test cases to his new algorithmic probl ......
Matching 1229E Marek 1229 and

Competition Set - 数学相关

CF645F Link&Submission. 利用 \(\sum\limits_{d|n}\varphi(\frac{n}{d})=n\),只要对每个数 \(x\),求出 \(cnt_x\) 表示 \(x\) 的倍数数目,然后 \(\sum\limits_{x}\varphi(x)C_{cnt_x ......
Competition 数学 Set

CF842A Kirill And The Game

如果考虑 \([x,y]\) 中什么位置能乘到 \([l,r]\) 就比较麻烦,简单的做法是考虑 \(l\) 和 \(r\) 对应到 \([x,y]\) 中的位置。左边界至少是 \(\frac{l-1}{k}+1\),右边界至多是 \(\frac{r}{k}\),判断一下与 \([x,y]\) 是否 ......
Kirill 842A Game 842 And

CF1467B Hills And Valleys

修改一座山可能改变其两侧山的类型。贪心地考虑,要么是修改成其左侧山的高度要么是修改成其右侧山的高度,这样能够在使得当前山不成为山峰和山谷的同时让两侧的山尽可能不成为山峰和山谷。如果不在左右两座山高度之间,那一定是山峰或者山谷,修改后肯定不劣。 修改第一座山或最后一座山也是无意义的,完全可以修改第二座 ......
Valleys 1467B Hills 1467 And

使用Object.defineProperty() 定义对象属性时,如已设置 set 或 get, 就不能设置 writable 和 value 中的任何一个了。TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>

使用Object.defineProperty() 定义对象属性时,如已设置 set 或 get, 就不能设置 writable 和 value 中的任何一个了,不然会报如下错误。 TypeError: Invalid property descriptor. Cannot both specify ......

How to use a shell script to check whether a command had been installed in the Linux server All In One

How to use a shell script to check whether a command had been installed in the Linux server All In One shell script error [: :需要整数表达式 / [: -eq:需要一元表达... ......
installed command whether script server

[转]mysql或MariaDB的时间比较效率,用<,>,between..and..比date_format快

当然也是有代价的,就是对于不精确到最后秒的对比,比如查询某一天的,麻烦一点,需要写一个范围,比如 where a.create_time >= '2023-02-28 00:00:00' and where a.create_time <= '2023-02-28 23:59:59',到月和年的同理 ......
date_format 效率 MariaDB between 时间

模型转onnx遇到问题,报错 1. _thnn_fused_lstm_cell , 2._thnn_fused_gru_cell, 3. Exporting the operator numpy_T to ONNX opset version 11 is not supported.

目录GRULSTMExporting the operator numpy_T to ONNX opset version 11 is not supported RuntimeError: Exporting the operator _thnn_fused_lstm_cell to ONNX o ......

currently, chromedriver 114.0.5735.90 is recommended for chrome 114.*, so it is advised to delete the driver in PATH and retry

报错原因是驱动和浏览器不匹配 解决办法 1.下载低版本的谷歌浏览器 本次使用的是114 下载地址: https://downzen.com/en/windows/google-chrome/download/11405735199/ 2.下载谷歌浏览器的插件 https://registry.npm ......

MUH and Cube Walls 题解

MUH and Cube Walls 前言 怎么题解区同质化这么严重,16 篇题解全是 差分 + KMP,就没有人写别的做法吗。 (好吧其实是我一开始没想到差分才有了这么多奇怪做法) 题目大意 给定两个序列 \(a,b\),求 \(b\) 在 \(a\) 中出现了多少次。 我们定义 \(b\) 在 ......
题解 Walls Cube MUH and

javascript: The Best Guided Tour Plugin

Best Tour Plugins To Guide Visitors Through Your Apphttps://yonkov.github.io/post/display-shepherd-only-once/https://www.jqueryscript.net/blog/best-gu ......
javascript Guided Plugin Best Tour

Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable)

版本:ubuntu 22.04 Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) 嗯,被墙了。找到 /etc/apt ......

The 2021 China Collegiate Programming Contest (Harbin) JBEID

The 2021 China Collegiate Programming Contest (Harbin) JBEID J. Local Minimum 模拟 题意:一个数当且仅当它是当前列最小值同时也是当且行的最小值它才算入贡献。 思路:直接\(for\),预处理出每一行每一列的最小值,然后去\ ......
Programming Collegiate Contest Harbin China

题解 ARC141D【Non-divisible Set】

这个题不是网络流。 problem 我们说一个集合 \(D\) 是一个好的集合,当不存在集合中的两个不同元素 \(a,b\) 使得 \(a\) 是 \(b\) 的约数。 给定 \(N\) 个整数的一个集合 \(S\),值域均落在 \([1, 2*M]\) 内。 对 \(S\) 中的每个元素 \(A_ ......
题解 Non-divisible divisible 141D ARC

Little Victor and Set 题解

Little Victor and Set 题目大意 在 \([l,r]\) 中选不超过 \(k\) 个相异的数使得异或和最小,输出方案。 思路分析 分类讨论: 当 \(k=1\) 时: 显然选 \(l\) 是最优的。 当 \(r-l+1\le 10\) 时: 直接 \(O(n2^n)\) 暴力枚举 ......
题解 Little Victor Set and

OpenGL with GLFW GLAD and CMAKE

0. 前言 首先,无论是在youtube还是网站上,许多OpenGL的环境配置都是在VS studio里配置的,个人比较喜欢使用VS code,以及Cmake. 下文给出了一个Cmake版本关于 GLFW GLAD 的编译环境。 另外,感谢分享知识的人。 具体的代码已放入 github 中, 代码地 ......
OpenGL CMAKE GLFW GLAD with

org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java

项目场景:项目中执行clean,再执行install时报错,错误如下 org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class ......

selenium 报错 element not interactable: [object HTMLDivElement] has no size and location

selenium 自动化识别验证码x,y坐标 命令move_to_element_with_offset 报错:element not interactable: [object HTMLDivElement] has no size and location 由于>4.0是以中心点偏移,4.0是左 ......

nuxt 项目 certificate has expired 或 nuxt unable to verify the first certificate

plugins/axios.js const https = require('https') export default function ({ $axios}){ $axios.create({ httpsAgent: new https.Agent({ rejectUnauthorized: ......
certificate nuxt expired 项目 unable

STL(13) set multiset

目录源码VC6中没有identity()那么如何调用呢使用multiset 有了红黑树的基础,set和map就变得很简单了 源码 一步一步的调用rbtree 因为set的value就是key 所以从value中取出key就用identity就可以 而取出迭代器用的是const iterator 不允 ......
multiset STL set 13

How to print a string with a variable by using the echo command in the shell script All In One

How to print a string with a variable by using the echo command in the shell script All In One Node.js & nvm ......
the variable command string script

使用 sudo apt-get update 命令时出现 Certificate verification failed: The certificate is NOT trusted.

命令: sudo apt-get update 问题:Certificate verification failed: The certificate is NOT trusted. Try installing ca-certificates. 忽略:1 https://professional- ......

Docker - Install and Uninstall

Install: 1. Set up Docker's Apt repository. # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo ......
Uninstall Install Docker and