题解monocarp 1886d and

Linux input and ouput command < symbol & > symbol All In One

Linux input and ouput command < symbol & > symbol All In One left input / right output < 向左侧输入 > 向右侧输出 pbcopy pbpaste 剪切板 ......
symbol command Linux input ouput

error and except

import logging logging.basicConfig(filename="std.log", format='%(asctime)s %(message)s', filemode='w') logger=logging.getLogger() logger.setLevel(logg ......
except error and

2012-2013 ACM-ICPC, NEERC, Moscow Subregional Contest题解

题目链接:2012-2013 ACM-ICPC, NEERC, Moscow Subregional Contest C. Cinderella(贪心) 思路 答案为大于平均值的数的数量 代码 #include <bits/stdc++.h> using namespace std; using i ......
题解 Subregional ACM-ICPC Contest Moscow

题解 CF1764G Doremy's Perfect DS Class (Extra)

题解 CF1764G Doremy's Perfect DS Class (Extra) 题意 交互库有一个 $1\sim n$ 的排列 $p$,你每次可以想交互库给定三个整数 $l,r,k(1\le l\le r\le n,1\le k\le n)$,交互库会返回 $\lfloor p_l/k\r ......
题解 Perfect Doremy 1764G Class

一些自己做的算法题解

//得到支点下标 function partition(arr, low, high) { const tmp = arr[low]; while (low < high) { //high位置值大于tmp,high自减 while (low < high && arr[high] >= tmp) ......
题解 算法

Salt formation: an effective means to improve the physical and chemical properties of drug molecules and enhance the druggability of drugs

Salt formation is one of the effective means to improve the physicochemical properties of drug molecules and enhance drug-forming properties. ......

CF1473D 题解

题目传送门 题目分析 线段树、前缀和、$\text{ST}$ 表题解都有了,我补一发猫树题解吧。 由于每次操作只能将大小改变成跟原来差 $1$,所以只需要知道这段操作中的最大值和最小值,最后所求的答案的范围就被卡住了。对于每一次操作,我们把操作序列拦腰斩断,那么分别求两边的范围,最后减去重复的部分即 ......
题解 1473D 1473 CF

CF1758D 题解

前言 题目传送门! 更好的阅读体验? 用一种非常麻烦的做法把自己写自闭了,和题解区不一样,但是方法困难很多。 思路 代码 属于混乱邪恶了,凑合着看看。 #include <iostream> #include <cstdio> #include <cmath> using namespace std ......
题解 1758D 1758 CF

「2019 集训队互测 Day 4」绝目编诗 题解

题目大意 给出一个 $n$ 个点 $m$ 条边的简单无向图,判断是否存在两个长度相同的简单环。 $1 \le n \le 10^4 , 1 \le m \le 10^6$。 思路 考虑暴力怎么做。 我们可以对于每个点,搜出包含这个点的环。 那么我们就有了一个玄学复杂度的暴力。考虑优化。 因为一个无向 ......
集训队 题解 2019 Day

Graphs with Python: Overview and Best Libraries

Graphs with Python: Overview and Best Libraries Graph analysis, interactive visualizations, and graph machine learning A graph is a relatively old mat ......
Libraries Overview Graphs Python Best

题解:C Future

题目:给n个范围,第i个范围选pi,然后定义特征值k=p1+p2+...+pn。这次的开心度就是A(k%m)。m是给的一个数组A,长度为m。 要求: 就是个全排列组合的问题,找规律。 举个例子,有n个礼物,分别是(L1,R1) (L2, R2) (Ln, Rn) 每个区间取个数然后相加,所有出现的结 ......
题解 Future

[ARC127E] Priority Queue 题解

首先我们每次加入的数必定是一个 $1\sim a$ 的排列,但从排列角度考虑的话非常复杂,因为 $s$ 是一个集合。所以我们考虑最后能剩下哪些数。 考虑最后剩下的集合为 ${a_i}$,其中 $a_i<a_{i+1}$,显然这个集合里面的元素个数为 $A-B$。 那么我们会发现一件事情:我们按上升序 ......
题解 Priority Queue 127E ARC

Understanding the different flavors of Clang C and C++ compilers in Windows

https://blog.conan.io/2022/10/13/Different-flavors-Clang-compiler-Windows.html This article will explain the different flavors of Clang C and C++ comp ......

How to Disable Suspend and Hibernation Modes In Linux

How to Disable Suspend and Hibernation Modes In Linux Disable Suspend and Hibernation in Linux sudo systemctl mask sleep.target suspend.target hiberna ......
Hibernation Disable Suspend Modes Linux

感觉和知觉(Perception and Consciousness)的区分和学习

感觉和知觉(Perception and Consciousness) consciousness 是知觉,这个应该是被动对环境的反应和内在的意识 Perception 对对外的感觉,主动对外界的思考的探索 前缀per- 表示“完全,贯穿,自始至终,向前”。forth, ford 是其同源词。 词根 ......
Consciousness 知觉 Perception 感觉 and

abc248_e K-colinear Line 题解

K-colinear Line 题意 平面直角坐标系上给出 $n$ 个点,第 $i$ 个点的坐标为 $(x_i, y_i)$。 请求出平面上有多少条直线穿过 $n$ 个点中的至少 $k$ 个点。如果有无数条这样的直线,输出 Infinity。 数据范围 $1 \leqslant K \leqslan ......
题解 K-colinear colinear Line abc

Codeforces Educational Codeforces Round 145 (Rated for Div. 2) C. Sum on Subarrays 题解

题意 Codeforces Educational Codeforces Round 145 (Rated for Div. 2) C. Sum on Subarrays 给你 $n$ 和 $k$ ,要求生成一个长度为 $n$ 的数组 $a$,且他的非空正子数组的数量为 $k$ ,非空负子数组的数量 ......

abc247_f Cards 题解

Cards 题意 有 $N$ 张卡片,每张卡片上都写有两个数字,第 $i$ 张卡片上的数字分别为 $P_i, Q_i$。 同时,$P = (P_1, P_2, \dots, P_N)$ 和 $Q = (Q_1, Q_2, \dots, Q_N)$ 都是 $(1, 2, \dots, N)$ 的全排列 ......
题解 Cards abc 247

题解

calc 使用 cin 读入两个 int 和一个 char,判断即可。 step 因为可以从前面 $K$ 个台阶走过来,所以累加前面 $K$ 个台阶的方案数即可,时间复杂度 $O(NK)$。 令 $f_i$ 表示走到第 $i$ 个台阶的方案数,容易发现 $$\begin{equation*}\beg ......
题解

Squeeze-and-Excitation Networks(SENet)

结构和代码如下(参考:b站视频:YOLOv5 v6.1添加SE,CA,CBAM,ECA注意力机制教学,即插即用): Global pooling:每个channel上面的所有点做平均,这样每个channel都输出一个数。所以左图中,HxWxC变成了1x1xC。(参考:关于global average ......

YBTOJ 5.4例3 最长距离 题解

挂大分!!!!!! 1.一定要看清提干有没有多测 2.多测不清空 爆零两行泪 3.同时线性更新最大值和次大值时记得最大值更新要同时把旧的最大值给次大值 题解 首先可以想到一个最暴力的暴力 : 对于每一个点 暴力枚举所有的点跑LCA 复杂度 $O(n^2logn)$ 显然会炸 然后就有一个优化一点的暴 ......
题解 YBTOJ 5.4

Python script get date and time All In One

Python script get date and time All In One Python shell script print current datetime to log file ......
Python script date time All

Codeforces Round 863 (Div. 3) E. Living Sequence 题解

题意 Codeforces Round 863 (Div. 3) E. Living Sequence 如果正整数中不能存在 $4$,那么新生成的数中的第 $k$ 个数为多少? 思路 $4$ 不能够选,也就是每一位只能选择 $0,1,2,3,5,6,7,8,9$ 。可以发现,这就是一个九进制。 当需 ......
题解 Codeforces Sequence Living Round

intellij idea 中On 'Update' action 下无Update classes and resources选项

intellij idea 中使用tomcat发布项目时,On ‘Update’ action 下无Update classes and resources选项,这时在tomcat设置中Deployment要使用exploded模式的war包。只有exploded模式下才会有update class ......
Update resources intellij classes action

CF698F Coprime Permutation 题解

题意 给定一个未填满的数组 $p$,求有多少种 $1\sim n$ 的排列 $p$ 满足对于任意 $i<j$,都有 $[\gcd(i, j)=1]=[\gcd(p_i, p_j)=1]$,答案对 $10^9+7$ 取模。 题解 部分参考这篇题解(感觉这篇题解应该是目前为止最详细的吧)。 记 $P$ ......
题解 Permutation Coprime 698F 698

Codeforces Round 864 (Div. 2) 题解

A. Li Hua and Maze 题目保证了两个点的哈密顿距离至少为 $2$,所以他们不会相邻。 只要有点在角上答案就是 $2$,在边上但不在角上就是 $3$,否则就是 $4$。 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_contain ......
题解 Codeforces Round 864 Div

AtCoder Beginner Contest 297 题解

A - Double Click 直接模拟就好。 时间复杂度:$O(N)$。 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include ......
题解 Beginner AtCoder Contest 297

【论文阅读笔记】iCaRL: Incremental Classifier and Representation Learning

Author: Alexander Kolesnikov Key_words: nearest-mean-of-exemplar rule, prioritized exampler selection,representation learning Create_time: September 1 ......

Zeros and Ones UVA - 12063

给出n、k(n≤64,k≤100),有多少个n位(无前导0)二进制数的1和0一样多,且值为k的倍数? f[i][j][k] #include <iostream> #include <cstring> #include <cmath> #include <algorithm> using names ......
Zeros 12063 Ones UVA and