shadow the dog and
[LeetCode] 1352. Product of the Last K Numbers 最后 K 个数的乘积
Design an algorithm that accepts a stream of integers and retrieves the product of the last k integers of the stream. Implement the ProductOfNumbers c ......
Cisco Nexus 9000 系列交换机系统软件 NX-OS Standalone 10.4(1)F and ACI Mode 16.0(3e) 发布
Cisco Nexus 9000 系列交换机系统软件 NX-OS Standalone 10.4(1)F and ACI Mode 16.0(3e) 发布 Cisco Nexus 9000 Series Switches, NX-OS Standalone 10.4(1)F and ACI Mode ......
Update 1.82.1: The update addresses this security issue.
August 2023 (version 1.82) 更新后显示发行说明 Update 1.82.1: The update addresses this security issue. Welcome to the August 2023 release of Visual Studio Code ......
F. Mahmoud and Ehab and yet another xor task 线性基
Problem - F - Codeforces 题意:给出一个长度为n的数组,然后给出q次询问。 对于每次询问,给出一个l和一个x,请你求出在[1,l]这个区间内,有多少个子序列是好的,好的的定义是这个子序列的异或和为x。 做法:考虑线性基,先离线处理询问,对其l排序。然后对于l,求该情况下的线性 ......
Fixed Autel IM608 II “The device is locked. Error code 106” Issue
Problem: When I was trying to use Autel IM608 II Key Programmer to read the 2016 BMW engine ECU ISN, it kept saying the prompt: “Abnormally detected. ......
哈希表 知识速记(9/11 and 9/13)
哈希表 拉链法 #include <cstring> #include<string> #include <iostream> using namespace std; const int N = 100003; int h[N], e[N], ne[N], idx; void insert(int ......
CF1332E Height All the Same
原题 翻译 首先看到这题首先可以想到应该和奇偶性相关…… 然后就没有一点思路了,遂看题解 首先,可以观察到结果和实际的高度无关,之和高度的奇偶性有关。 这个很好理解,因为我们可以用操作\(2\)使得在同奇偶性的数域内变化。 因此我们只考虑操作\(1\) 这里要知道一个结论:如果\(a_{i,j}\) ......
error Mixed spaces and tabs no-mixed-spaces-and-tabs
运行Vue项目出现下面截图中的这个问题 百度翻译一下,说是不能同时使用tab键和空格来对代码进行缩进。看了一下代码,确实有行代码缩进了6个字符,改回来正常运行。 ......
Eclipse中出现Java compiler level does not match the version of the installed java project facet问题
问题描述同样的项目copy到另外一个package中报错 解决方法1. 右键项目 properties --> Java compiler 查看选择的版本 2. 到项目的路径下,使用文本编辑器打开org.eclipse.wst.common.project.facet.core.xml 3.把版本和 ......
Transformer-empowered Multi-scale Contextual Matching and Aggregation for
Transformer-empowered Multi-scale Contextual Matching and Aggregation for Multi-contrast MRI Super-resolution(阅读文献)10.12 基于变压器的磁共振多对比度超分辨率多尺度背景匹配与聚合 摘 ......
2023.9.13 greedy and DS
CF1439C 考虑修改操作,由于序列是单调的,所以只需要线段树二分出修改的区间即可。 考虑查询,一定是若干个连续段,设一开始是 \(y\),这个连续段结束后,\(y\) 至少减去一半,所以连续段个数是 \(\log\) 级别。 在线段树上遍历即可。 ......
frequently used character, numeric, and date functions
# Character functions ## ANYALNUM(str, startpos) Return position of first occurrence of any alphabetic or numeric value after or at the start postion ......
Image decoding on the web
Image decoding on the web Inian ParameshwaranJun 12, 2019 What is decoding Image decoding is the process of converting the encoded image back to a unc ......
SpringBoot项目启动报错:An incompatible version [1.1.22] of the Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
问题解释: “安装了不兼容的Apache Tomcat原生库版本[1.1.22],而Tomcat需要版本[1.2.14]” 解决方法: ① 打开网页 http://archive.apache.org/dist/tomcat/tomcat-connectors/native/ ② ③ ④ ⑤ 复制到 ......
The 2021 ICPC Asia Macau Regional Contest
Preface 这场是上周六和队里VP的,因为中间其它比赛很多所以就没补题了把过了的题写一下 这场纯被徐神带飞,后期发现FFT精度问题提出了神之一手,然后又轻松写意地秒了道广义SAM,徐神真是太强辣 A. So I'll Max Out My Constructive Algorithm Skill ......
SQLAlchemy: What's the difference between flush() and commit()?
SQLAlchemy: What's the difference between flush() and commit()? https://pyquestions.com/sqlalchemy-what-s-the-difference-between-flush-and-commit A Se ......
Failed to connect to server: hadoop/ip:9000: try once and fail.
hadoop 连接失败,报如下错误! java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChann ......
Concurrency and Parallelism
简而言之,Concurrency(并发)就是交替执行多个任务,而 Parallelism(并行)是同时执行多个任务。 Concurrency Parallelism 多线程和硬件 在单核CPU中,只有并发,没有并行; 编程中,编程语言调用系统的接口,编程语言只负责调用,至于是并发还是并行,还得取决于 ......
CF1867A green_gold_dog, array and permutation
思路 很简单的一道题,洛谷大概都不会开放题解通道?(实际上貌似每场比赛的 A 都没开放?) 显然,对于原数组较小的数,我们尽量让大的数,取全排列的较小的数,这样可以保证差是逐渐变小的,也就让 \(c\) 数组差异变大。 所以直接拿个 struct 存,然后两边排序就好。 AC code #inclu ......
CF1867C Salyg1n and the MEX Game
思路 看着无从下手,实际上又是一道诈骗题。 假设原数列不存在 \(0\),那么我们可以直接加入 \(0\),然后游戏结束,假设答案是 \(k\)。那么,如果我们选择加入 \(k\),来试图让答案变大,那么 Bob 就会移除一个数,最优的话是 \(1\),这样的话,你无论加入 \(1\) 还是 \(0 ......
CF1867E1 Salyg1n and Array (simple version)
思路 首先考虑,\(n\) 是 \(k\) 的倍数的情况,直接枚举询问所有每一段就好,然后输出每一段的异或和的异或和。 如上图,每次询问都没有重叠部分,颠转互不干扰。 那么,\(n\) 不是 \(k\) 的倍数的情况呢? 可以看到,与第一种情况的区别就是末尾多了一小截,那么我们需要考虑如何计算这一小 ......
CF1867E2 Salyg1n and Array (hard version)
其实如果你在做 E1 的时候想到正解了,这道题都甚至不需要改 E1 的代码,直接交就好,这大概也是 E2 的分还没 E1 的高的原因。 因为一摸一样的思路,所以这里就不作介绍了,可以看看我的题解。 在这里呢,主要是稍微证明一下询问次数不会超,如下: 可以发现,有余数的情况,只会增加两次询问,而后面的 ......
Redis - 出现ERROR:WRONGTYPE Operation against a key holding the wrong kind of value
原因:用的方法与redis服务器中存储数据的类型存在冲突。 比如:有一个key的数据存储的是list类型的,但使用redis执行数据操作的时候却使用了非list的操作方法。 对一个Redis键执行不兼容的操作,这个错误通常发生在以下情况: 1、类型不匹配:试图执行的操作与键存储的数据类型不匹配。例如 ......
The 2020 ICPC Asia Shenyang Regional Programming Contest DFIK
The 2020 ICPC Asia Shenyang Regional Programming Contest - Codeforces DFIK D. Journey to Un'Goro 思路:思维+搜索 一开始以为是构造,好吧但是是搜索。 我们先考虑什么时候是最大值? 首先考虑,题目要求我们 ......
openjdk maven 打包报错 maven the trustAnchors parameter must be non-empty
原因: openjdk无法打包 解决:maven打包名加上 -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true 比如:mvn clean -Dmaven.wagon.http.ssl.insecure=t ......
Rust build is seamlessly integrated into the Flutter build process
super_clipboard uses Rust internally to implement low-level platform specific functionality. Rather than shipping prebuilt binaries with the plugin, R ......
CF1718F Burenka, an Array and Queries
显然先考虑把每个 \(a_i\) 只因数分解,令 \(S(x)\) 表示 \(x\) 只因子的集合。 令 \(S_{l,r}=S\left(\prod\limits_{i=l}^ra_i\right)=S(a_l)\cup S(a_{l+1})\cup\cdots \cup S(a_r)\)。假如我 ......
CF1559D1&D2 Mocha and Diana
原题(Eazy Version) 原题(Hard Version) 翻译 首先我们先考虑Eazy Version。容易发现,在\(A,B\)两个森林中一定有一个是一棵树。这个结论说明: 选边顺序没影响 能选就选 因此我们枚举\(n^2\)条边,用并查集判断连通性即可 最终复杂度\(O(n^2 \al ......
The_Counterintuitive_Art_of_Memory:_Why_Retrieval_Beats_Cramming_
Introduction I have spent years as a cognitive psychologist, delving into the intricate mechanisms of memory and learning. And if there's one thing I' ......
The_Lifelong_Quest:_Building_Something_for_Others_While_Expressing_Who_You_Are
Introduction Ah, the lifelong quest! We all have one, don't we? A dream, a passion, a mission—something that we are willing to devote our lives to. Mi ......