摘要: ## [$GSS3$ - $Can$ $you$ $answer$ $these$ $queries$ $III$](https://www.luogu.com.cn/problem/SP1716) [SPOJ](https://www.spoj.com/problems/GSS3/en/) 与$G 阅读全文
posted @ 2022-04-28 22:08 糖豆爸爸 阅读(46) 评论(0) 推荐(0)
摘要: ## [$GSS1$ - $Can$ $you$ $answer$ $these$ $queries$ $I$](https://www.luogu.com.cn/problem/SP1043) [SPOJ](https://www.spoj.com/problems/GSS1/en/) 看题意看洛 阅读全文
posted @ 2022-04-28 18:26 糖豆爸爸 阅读(65) 评论(0) 推荐(0)
摘要: 题目传送门 一、题目大意 给你一个序列,你要在这个序列上进行操作。 操作$1$ 给定区间$[l,r]$,对序列中这个区间中每个数字累加求和。 操作$2$ 给定区间$[l,r]$ 和 $x$,对区间每个数字对$x$取模。 操作$3$ 给定两个数$i,k$,将$a[i]$的值修改为$k$。 二、思路 注 阅读全文
posted @ 2022-04-28 15:05 糖豆爸爸 阅读(40) 评论(0) 推荐(0)
摘要: #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <cmath> using namespace std; typedef long long LL; const int N 阅读全文
posted @ 2022-04-28 11:17 糖豆爸爸 阅读(33) 评论(0) 推荐(0)
摘要: ##$GSS4$ - $Can$ $you$ $answer$ $these$ $queries$ $IV$ 一、题目描述 给定的$n$个数,我们定义两个操作,分别是区间开根号以及区间求和。共有$m$次查询,其中$n,m≤1e5$。 二、解题思路 一个$1e18$以内的数,经过最多$6$次开平方操作 阅读全文
posted @ 2022-04-28 11:04 糖豆爸爸 阅读(73) 评论(0) 推荐(0)
摘要: 裴蜀定理(贝祖定理) 定理 对任何整数 $a、b$ 和 $m$,关于未知数 $x$和 $y$ 的线性丢番图方程(称为裴蜀等式): $$\LARGE ax+by=m$$ 有整数解时当且仅当 $m$是$a$及$b$的最大公约数$d=gcd(a,b)$的倍数。 裴蜀等式有解时必然有无穷多个整数解,每组解$ 阅读全文
posted @ 2022-04-28 09:37 糖豆爸爸 阅读(441) 评论(0) 推荐(0)
Live2D