logarithm beginner discrete problems

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 ......
Advanced Feedback Problems Control Systems

[ABC315Ex] Typical Convolution Problem

题目链接 首先观察到这个形式,容易发现它和常规的卷积不同点就在于:题目给出的求和定义中,\(\sum\) 符号下面的式子是 \(i+j<N\) 求和而不是 \(i+j=N\)。 为了方便计算,我们引入: \[G_n=\sum_{i+j<N}F_iF_j \]我们发现,假设所有 \(F_{1\sim{ ......
Convolution Typical Problem ABC 315

2023 合肥站 热身赛 B Problem F. Flower’s Land 换根dp 依赖背包

传送门。 求出包含某个点连通块大小为K的权值和最大值。 钦定1为根节点,只求根节点的答案,其实是一个依赖性01背包问题可以$nk$的时间内解决。 考虑进行换根操作,由于背包是取max的背包没办法进行背包的删除,然而取前后缀背包背包的合并为$k^2$复杂度过高。 当时还有一个想法是点分树,但是维护的信 ......
热身赛 背包 Problem Flower 2023

AtCoder Beginner Contest 330

B - Minimize Abs 1 思维题 题意:给定一个范围,你选择一个数,使得 思路:如果A[i]在l,r中间,那么直接打印就行,如果不是就打印就近的 using namespace std; void solve(){ int n,l,r; cin>>n>>l>>r; for(int i=1 ......
Beginner AtCoder Contest 330

AtCoder Beginner Contest 326

A - 2UP3DOWN #include<bits/stdc++.h> using namespace std; #define int long long void solve() { int a, b; cin >> a >> b; if (a < b and b - a <= 2) cout ......
Beginner AtCoder Contest 326

AtCoder Beginner Contest 322

A - First ABC 2 #include <bits/stdc++.h> using namespace std; #define int long long #define mp make_pair using vi = vector<int>; using pii = pair<int, ......
Beginner AtCoder Contest 322

TOYOTA SYSTEMS Programming Contest 2023(AtCoder Beginner Contest 330)

TOYOTA SYSTEMS Programming Contest 2023(AtCoder Beginner Contest 330) A - Counting Passes int main() { IOS; cin >> n >> m; int ans = 0; rep (i, 1, n) ......
Contest Programming Beginner SYSTEMS AtCoder

[ABC327G] Many Good Tuple Problems

题目链接 简化题意:有一个 \(n\) 个点的图,问有多少个长度为 \(M\) 的边序列,满足连边后图是二分图。 \(n\le 30,m\le 10^9\) 考虑先强制要求无重边。 定义 \(f_{i,j}\) 为 \(i\) 个点,\(j\) 条边的图的二分图染色数量(染色方式不同算多次)。这个是 ......
Problems Tuple 327G Many Good

AtCoder Beginner Contest 327 D

AtCoder Beginner Contest 327D D - Good Tuple Problem (atcoder.jp)(种类并查集,二分图染色) 算法学习笔记(7):种类并查集 附上典题:P1892 [BOI2003] 团伙 种类并查集做法 #include <bits/stdc++.h ......
Beginner AtCoder Contest 327

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 ......

CF1891 D Suspicious logarithms 题解

Link CF1891 D Suspicious logarithms Question 我们设 \(y=f(x)\) 表示最大的 \(y\) 满足 \(2^y \le x\) 设 \(z=g(x)\) 表示最大的 \(z\) 满足 \(f(x) ^z \le x\) 求 \[\sum\limits ......
题解 Suspicious logarithms 1891 CF

AtCoder Beginner Contest 330

A - Counting Passes (abc330 A) 题目大意 给定\(n\)个学生的分数,以及及格分 \(x\),问多少人及格了。 解题思路 依次判断即可。 神奇的代码 #include <bits/stdc++.h> using namespace std; using LL = lon ......
Beginner AtCoder Contest 330

OI_problem 玛丽卡_洛谷P1186

题意 一个 \(N\) 个点 \(M\) 条边的带边权无向图,要求输出最小的 \(V\) 使得不管去掉哪一条边,都存在从 \(1\) 到 \(n\) 的路径使得边权和不超过 \(V\) 。 思路 感觉朴素不太好做,考虑二分。 对于一个二分值,即要判断在关于这个值的生成图中, \(1\) 和 \(n\ ......
OI_problem problem P1186 1186 OI

[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 选择 ......
Permutation Codeforces Another Problem 1858C

[Codeforces] CF1728C Digital Logarithm

题目传送门 很奇妙的一道题,我想到了正解,但是又没有完全想到 题意 我们定义 \(f(x)\) 表示取出 \(x\) 在十进制下的位数。( 如 \(f(114514) = 6, \; f(998244353) = 9\) )。形式化讲,就是 \(f(x) = \lfloor \log_{10} x ......
Codeforces Logarithm Digital 1728C 1728

[ABC327D] Good Tuple Problem 题解

分析: 这一道题很容易发现可以用并查集来维护 (不知道为什么其他人都用了图论),\(a_i\) 与其对应的 \(b_i\) 代表着 \(a_i\) 这个集合里不能存在着 \(b_i\)。 根据只有存在两个集合,所以我们会发现,若 \(x\) 与 \(y\) 不在一个集合且 \(x\) 与 \(z\) ......
题解 Problem Tuple 327D Good

AtCoder Beginner Contest 329 F

AtCoder Beginner Contest 329 F F - Colored Ball (atcoder.jp)(启发式合并) 问题陈述 有 \(N\) 个编号为 \(1, 2, \ldots, N\) 的盒子。最初,盒子 \(i\) 中有一个颜色为 \(C_i\) 的小球。 给你\(Q\) ......
Beginner AtCoder Contest 329

CF1728C Digital Logarithm

CF1728C Digital Logarithm 题目传送门 很奇妙的一道题,我想到了正解,但是又没有完全想到 题意 我们定义 $f(x)$ 表示取出 $x$ 在十进制下的位数。( 如 $f(114514) = 6, ; f(998244353) = 9$ )。形式化讲,就是 $f(x) = \l ......
Logarithm Digital 1728C 1728 CF

CF1858C Yet Another Permutation Problem

CF1858C Yet Another Permutation Problem Yet Another Permutation Problem - 洛谷 这题本来很简单,思路我也想到了,但是代码一直没写对,思路也一直换来换去(悲 然而发现最开始的思路是对的 题意 Alex 收到了一个名为 "GCD ......
Permutation Another Problem 1858C 1858

6-1891D-Suspicious logarithms

题意: 思路: 分块 , 先对f(x) 相同的分块, 在对g(x)相同的分块,注意爆long lnog 代码: 点击查看代码 #include <bits/stdc++.h> #define int long long using namespace std; typedef pair<int,in ......
D-Suspicious Suspicious logarithms 1891

AtCoder Beginner Contest 329

劳累一天不该写题,启发式合并都写错了 A - Spread (abc329 A) 题目大意 给定一个字符串,将每个字符输出出来,中间留个空格。 解题思路 遍历输出即可。 神奇的代码 #include <bits/stdc++.h> using namespace std; using LL = lo ......
Beginner AtCoder Contest 329

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 - ......
certificate problem issuer unable local

JWT - Problem of JWT

......
JWT Problem of

AtCoder Beginner Contest(abc) 326

B - 326-like Numbers 难度: ⭐ 题目大意 如果一个三位数的百位和十位的乘积等于个位, 那么这个数就是合法的; 问大于等于n的最小的合法的数是多少; 解题思路 因为数据范围很小, 所以可以直接暴力; 神秘代码 #include<bits/stdc++.h> #define int ......
Beginner AtCoder Contest 326 abc

AtCoder Beginner Contest 329

C - Count xxx 题意是:给你一个字符串,求出字符串里面相同字母的子串数量 思路:用map映射即可,取每个字母的最大长度,然后加起来 using namespace std; int main(){ int n; string s; cin>>n>>s; map<char,int>mp; ......
Beginner AtCoder Contest 329

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  ......
pollution Applying charging problem sewage

AtCoder Beginner Contest 329 (ABC329)

A. Spread 不说了,代码。 B. Next 不说了,代码。 C. Count xxx Description 给定一个长度为 \(N\) 的字符串 \(S\),求 \(S\) 中非空连续,并且包含重复字符的连续子串长度。 例如 $S = $ aaabaa,则它满足上述条件子串为 a,aa,a ......
329 Beginner AtCoder Contest ABC

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 ......

NLP-Beginner-实验一-基于机器学习的文本分类

任务 基于logistic回归和softmax rengression的文本分类 实验 分析不同的特征、损失函数、学习率对最终分类性能的影响 shuffle 、batch、mini-batch 处理流程 读取文本->提取词向量(BOW,N-gram)->softmax回归->输出预测特征 实验设置: ......
NLP-Beginner Beginner 文本 机器 NLP