数论counting another problem
Count Beautiful Substrings II
Count Beautiful Substrings II You are given a string s and a positive integer k. Let vowels and consonants be the number of vowels and consonants in a ......
The Design of Feedback Control Systems--Advanced Problems
AP10.1 A three-axis pick-and-place application requires the precise movement of a robotic arm in three-dimensional space, as shown in Figure AP10.1 fo ......
Atcoder-Countings4
Atcoder-Countings4 [ABC231G] Balls in Boxes Problem 有 \(n\) 个盒子,初始时第 \(i\) 个盒子内有 \(a_i\) 个小球,进行 \(k\) 次操作后,每次操作等概率随机选择一个盒子放入一个小球,设 \(k\) 次操作后每个盒子的小球个数 ......
[ABC315Ex] Typical Convolution Problem
题目链接 首先观察到这个形式,容易发现它和常规的卷积不同点就在于:题目给出的求和定义中,\(\sum\) 符号下面的式子是 \(i+j<N\) 求和而不是 \(i+j=N\)。 为了方便计算,我们引入: \[G_n=\sum_{i+j<N}F_iF_j \]我们发现,假设所有 \(F_{1\sim{ ......
2023 合肥站 热身赛 B Problem F. Flower’s Land 换根dp 依赖背包
传送门。 求出包含某个点连通块大小为K的权值和最大值。 钦定1为根节点,只求根节点的答案,其实是一个依赖性01背包问题可以$nk$的时间内解决。 考虑进行换根操作,由于背包是取max的背包没办法进行背包的删除,然而取前后缀背包背包的合并为$k^2$复杂度过高。 当时还有一个想法是点分树,但是维护的信 ......
[机翻]Fun With Another PG-Compliant Hook/另一个符合 PG 标准的钩子的乐趣
原文链接:https://revers.engineering/fun-with-pg-compliant-hook/ 目录Overview /概述Common Hook Points in Windows Kernel /Windows 内核中的常见钩子点The HalPrivateDispatc ......
DASCTF X CBCTF 2023 yet another sandbox
本来想直接复现昨天的DASCTF,但是前面的一个DASCTF已经开始看了,那就放到下次再写。 yet another sandbox js沙箱逃逸。 下载复现获得一个c写的readflag, 有个js的模块文件app.mjs: import express from 'express'; impor ......
[ABC327G] Many Good Tuple Problems
题目链接 简化题意:有一个 \(n\) 个点的图,问有多少个长度为 \(M\) 的边序列,满足连边后图是二分图。 \(n\le 30,m\le 10^9\) 考虑先强制要求无重边。 定义 \(f_{i,j}\) 为 \(i\) 个点,\(j\) 条边的图的二分图染色数量(染色方式不同算多次)。这个是 ......
USACO 2022 December Contest, Silver Problem 3. Range Reconstruction 题解
Link USACO 2022 December Contest, Silver Problem 3. Range Reconstruction Question \(r_{l,r}\) 表示 \(max[l,r]-min[l,r]\) 给出所有的 \(r_{i,j}\) 求一个可行的序列 Solu ......
CF1884 D Counting Rhyme 题解
Link CF1884 D Counting Rhyme Question 给定长度为 \(n\) 的数组 \(a\) 如果两个不同的下标 \(a_i,a_j\) 不能被任意一个元素 \(a_k,(1 \le k \le n)\) 共同整除,那么说明 \((i,j)\) 是"好对" ,求"好对" 的 ......
ARC66 D Interval Counts 题解
Link ARC66 D Interval Counts Question 给定正整数 \(n\) 和长度为 \(n\) 的序列 \(x_i,y_i\) 保证 \(x_i\) 单调递增,你需要构造 \(m\) 个去年 \([L_i,R_i]\) ,\(m\) 有你指定,使得每个 \(x_i\)恰好被 ......
OI_problem 玛丽卡_洛谷P1186
题意 一个 \(N\) 个点 \(M\) 条边的带边权无向图,要求输出最小的 \(V\) 使得不管去掉哪一条边,都存在从 \(1\) 到 \(n\) 的路径使得边权和不超过 \(V\) 。 思路 感觉朴素不太好做,考虑二分。 对于一个二分值,即要判断在关于这个值的生成图中, \(1\) 和 \(n\ ......
[Codeforces] CF1703F Yet Another Problem About Pairs Satisfying an Inequality
时间限制 \(2s\) | 空间限制 \(250M\) 题目描述 给你一个序列$ a_1, a_2, \dots a_n $ 。请计算出满足下面条件的 $(i,j) (1 \leq i, j \leq n) $个数 。 $ a_i < i < a_j < j $ . 输入格式 第一行包含一个整数 $ ......
[Codeforces] CF1858C Yet Another Permutation Problem
Yet Another Permutation Problem - 洛谷 这题本来很简单,思路我也想到了,但是代码一直没写对,思路也一直换来换去(悲 然而发现最开始的思路是对的 题意 Alex 收到了一个名为 "GCD 排列" 的游戏作为生日礼物。这个游戏的每一轮进行如下操作: 首先,Alex 选择 ......
[ABC329C] Count xxx 题解
插曲 因为本人看错了题面,买看到一个子串只包含一种字母,所以切完 D 和 E 才回来发现很简单。 问题翻译 给你一个长度为 \(N\) 的字符串 \(S\),由小写英文字母组成。 求 \(S\) 的非空子串中有多少个是一个字符的重复。在这里,作为字符串的两个子串是相等的,即使它们是以不同的方式得到的 ......
[ABC327D] Good Tuple Problem 题解
分析: 这一道题很容易发现可以用并查集来维护 (不知道为什么其他人都用了图论),\(a_i\) 与其对应的 \(b_i\) 代表着 \(a_i\) 这个集合里不能存在着 \(b_i\)。 根据只有存在两个集合,所以我们会发现,若 \(x\) 与 \(y\) 不在一个集合且 \(x\) 与 \(z\) ......
[LeetCode] 2563. Count the Number of Fair Pairs
Given a 0-indexed integer array nums of size n and two integers lower and upper, return the number of fair pairs. A pair (i, j) is fair if: 0 <= i < j ......
[LeetCode] 2824. Count Pairs Whose Sum is Less than Target
Given a 0-indexed integer array nums of length n and an integer target, return the number of pairs (i, j) where 0 <= i < j < n and nums[i] + nums[j] < ......
ElasticSearch之cat count API
读取当前存储的记录的数量。 命令样例如下: curl -X GET "https://localhost:9200/_cat/count?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+ ......
MySQL中count()、sum()区别
1、count0函数 里面的参数是列名的的时候,会计算有值项的次数sum(函数 里面的参数是列名的时候,会计算 列名的值的和。2、两个函数在 记录的列名的值为空或者是null时,都不会去统计即count(列名)和sum(列名) 都不计入这条记录 3、count()可以计算出行数,count (1)也 ......
CF1858C Yet Another Permutation Problem
CF1858C Yet Another Permutation Problem Yet Another Permutation Problem - 洛谷 这题本来很简单,思路我也想到了,但是代码一直没写对,思路也一直换来换去(悲 然而发现最开始的思路是对的 题意 Alex 收到了一个名为 "GCD ......
git SSL certificate problem: unable to get local issuer certificate
错误: git SSL certificate problem: unable to get local issuer certificate 这个问题是由于没有配置信任的服务器HTTPS验证。默认,cURL被设为不信任任何CAs,就是说,它不信任任何服务器验证。 解决方法 git config - ......
09-基础SQL-DQL(数据查询语言)-聚合函数(count、max、min、avg、sum)
DQL-介绍(常用) DQL英文全称是Data Query Language(数据查询语言),数据查询语言用来查询数据库中表的记录 查询关键字:SELECT DQL-语法 ......
Applying sewage charging system to deal with water pollution problem in Russia.
What is the sewage charging system? Although manufacturing has always been a key driving force for China's economic growth, it is also the root cause ......
Solving 0/1 knapsack problem with dynamic programming (英语课汇报)
Solving 0/1 knapsack problem with dynamic programming Introduction 0/1 knapsack problems A long time ago, an explorer went to an island where there we ......
java.io.IOException: Problem reading font data.
字体库问题:运行命令fc-list 在运行yum install fontconfig后并没有解决这个问题那就是是临时文件的问题 在查看Tomcat下bin/catalina.sh 文件找到java 的JVM临时目录java.io.tmpdir的配置是CATALINA_TMPDIR=“$CATALI ......
NEFU OJ Problem 1496 绿巨人吃绿苹果 题解
Problem:H Time Limit:1000ms Memory Limit:65535K Description 从前有一个绿巨人,他有个习惯是每餐只吃n个绿苹果。他有一棵神树,无限大,每一层都有且仅有k个枝杈,这k个枝杈上正好分别有1,2,3...,k个苹果。为了锻炼身体,他在同一层仅仅能选 ......
NEFU OJ Problem 1489 青蛙赶路 题解【动态规划DP】
Problem:G Time Limit:2000ms Memory Limit:65535K Description 有一只青蛙,每秒选择走1米或跳m米,青蛙体力不足,所以不能连续两秒都在跳。 青蛙将移动到[l,r]之间,它想知道有多少种不同的方式来实现其目标。 两种方式是不同的,当且仅当它们移动 ......