logarithm beginner discrete problems

AtCoder Beginner Contest 293 补题记录 (E-G)

E 题意:给定 A, X, M, 计算 (A0 + A1 + A2 + ... + AX-1) mod M (1 <= A, M <= 109, 1 <= X <= 1012)。 根据等比数列求和公式,(A0 + A1 + A2 + ... + AX-1) mod M = ((AX - 1) / ( ......
Beginner AtCoder Contest 293 E-G

【解题报告?】Discrete Logarithm is a Joke

QOJ 给定 $M = 10^{18} + 31, g = 42$,$g$ 是模 $M$ 意义下的原根。设 $f(x)$ 表示满足 $g^y \equiv x \pmod M$ 的最小正整数 $y$(即 $x$ 的离散对数)。我们有 $a_0 = 960002411612632915, a_n = ......
Logarithm Discrete 报告 Joke is

一个研究课题 A Research Problem UVA10837

输入正整数m(m≤1e8),求最小的正整数n,使得φ(n)=m。n<=2e8。 #include<cstring> #include<algorithm> #include<iostream> #include <map> using namespace std; const int M=1e5+5 ......
研究课题 课题 Research Problem 10837

Can not construct instance of com.hm.drgs.platform.common.dto.data.group.DrgsRecordGroupResultDto, problem: Should never call 'set' on setterless property

报错全部信息: JSON parse error: Can not construct instance of com.hm.drgs.platform.common.dto.data.group.DrgsRecordGroupResultDto, problem: Should never cal ......

AtCoder Beginner Contest 297

A - Double Click #include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int n , d; cin >> n >> d; vector<int> a(n); for( ......
Beginner AtCoder Contest 297

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

AtCoder Beginner Contest 207(D,E)

AtCoder Beginner Contest 207(D,E) D(计算几何) D 这个题是两个点的集合,每个集合有$n$个点,我们可以让一个集合中的每一个点进行下面两种操作 $1$,可以让每一个点进行旋转$x$的角度 $2$,可以让每一个点的$x$变成$x+disx$,$y$变成了$y+dis ......
Beginner AtCoder Contest 207

AtCoder Beginner Contest 247(E,F)

AtCoder Beginner Contest 247(E,F) E(思维) E 这个题大意就是给一个长度为$n$的数组,一个$x$和一个$y$,问这个数组里面可以找到多少段$[l,r]$满足这一段里面的最大值是$x$,最小值是$y$ 这里的做法是固定最右端,寻找最左端的可能的数量,最后相加 对于 ......
Beginner AtCoder Contest 247

练习记录- AtCoder Beginner Contest 295(D)

vp的 觉得我的D很聪明所以来写一下(乐 D - Three Days Ago 题意就是 求所有字符出现次数均为偶数的字串数量 太笨了所以想了很久 我把 存在奇数个1 当作第2位是 2 那么 当经过了两次1 2^2 这个2 就变成了0 2 就是第二位 就是4 ...以此类推 所以我遍历一遍字符串 求 ......
Beginner AtCoder Contest 295

解决前端启动报错:This is probably not a problem with npm. There is likely additional logging output above.

在执行 npm run dev 运行项目的时候报错: {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phan ......
前端 additional probably logging problem

练习记录-AtCoder Beginner Contest 296(A-F)

vp的 感觉整场挺智慧 A - Alternately 找有没有连续的男女 #include<bits/stdc++.h> #define close std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) using namespace st ......
Beginner AtCoder Contest 296 A-F

AtCoder Beginner Contest 278

口胡一下,从青色开始 E - Grid Filling 给定一个W×H的矩阵,每个格子有一个数,在1和N之间,给定w<=W,h<=H,对于每个满足1<=i<=W-w+1,1<=j<=H-h+1的格子(i,j),求以它为左上角的w×h矩阵被遮住后整个大矩阵还剩下几种数字。 W,H,N,w,h<=300 ......
Beginner AtCoder Contest 278

COMP20007 Task 2: C Problem

Task 2: C ProblemAssignment 1GeneralTask 1: AlgorithmicDesignTask 2: C ProblemAssignment SubmissionAcademic HonestyLate PolicyRequirements: CProgrammi ......
Problem 20007 COMP Task

Discrete-Time Integrator控件的理解

真实值的情况:假设1K的载波 Ts=0.001s的周期 输入1K的值 积分项Gain = 1 则每1ms,输出增加1000 x 0.001 = 1 ......

AtCoder Beginner Contest 155

AtCoder Beginner Contest 155 https://atcoder.jp/contests/abc155 D - Pairs 这个二分好难写,疯狂WA,QAQ #include <bits/stdc++.h> #define ll long long using namespa ......
Beginner AtCoder Contest 155

AtCoder Beginner Contest 156

AtCoder Beginner Contest 156 https://atcoder.jp/contests/abc156 D - Bouquet 组合数学。 二项式定理。 注意取模之前一定要保证他是正数(有时候只加一次mod可能不够) #include <bits/stdc++.h> #def ......
Beginner AtCoder Contest 156

AtCoder Beginner Contest 226(E,F,G)

AtCoder Beginner Contest 226(E,F,G) E(并查集) E 这个题的大意是给我们一个无向图,我们可以把这些无向边变成有向边,让每一个点的入度都是$1$,问有多少种变化方式 要让有$x$个点的无向图,形成一棵树的边的数量是$x-1$,但是我们需要的是每一个点的入度为$1$ ......
Beginner AtCoder Contest 226

AtCoder Beginner Contest 294(E,F,G)

AtCoder Beginner Contest 294(E,F,G) E (思维,双指针) E 这个题的大意就是有一个$2$行$L$列的网格,每个格子里面都有不同的数字,但是它的输入方式不是一个一个输入的,而是从第一个开始,枚举每个数在这一段的数量,(比如$a_1=2,L_1=3$,那么此时就已经 ......
Beginner AtCoder Contest 294

UCUP-ZJ M. Minimum Element Problem

题意 给定一个位置x,求在$p_x$分别取1-n的所有情况下,对应笛卡尔树不同的排列个数。 题解 先不考虑$p_x$,列出转移式,发现是卡特兰数。 进一步地,可以把排列对应笛卡尔树意义下的不同构数,和二叉树不同构数等价联系起来:因为对于任何一个二叉树,按照中序遍历在上面填1-n,就可以唯一确定一个排 ......
UCUP-ZJ Minimum Element Problem UCUP

AtCoder Beginner Contest 154

AtCoder Beginner Contest 154 https://atcoder.jp/contests/abc154 今天也比较简单。 E - Almost Everywhere Zero 贪心或者数位dp。 (其实我这个贪心应该就是在模拟数位dp) 贪心 #include <bits/s ......
Beginner AtCoder Contest 154

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 比赛连接 好久没写题解了~~ D - M<=ab 题意就是给定N,M, 求一个最小的数x同时满足x>=M且x=a*b(a<=N,b<=N); N,M<=1e12 开始脑瘫想了二分,仔细一想很明显x不满足单调性,想了下暴力的时间复杂度巨大... ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 144

AtCoder Beginner Contest 144 https://atcoder.jp/contests/abc144 补一下3.23做的。 D - Water Bottle 分类讨论,三角函数。 #include <bits/stdc++.h> #define pi acos (-1) u ......
Beginner AtCoder Contest 144

AtCoder Beginner Contest 296 A-E

AtCoder Beginner Contest 296 A - Alternately 1 void solve(){ 2 int n=read(); 3 string s; 4 cin>>s; 5 int ans=1; 6 for(int i=0;i<s.size()-1;i++){ 7 if( ......
Beginner AtCoder Contest 296 A-E

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 赛时代码 A - Alternately // Problem: A - Alternately // Contest: AtCoder - AtCoder Beginner Contest 296 // URL: https://atcod ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 做题记录

D - M<=ab 题意:求最小的正整数,不小于 $m$,且能被表示为两个不大于 $n$ 的正整数的数,不存在输出 -1。$n,m\le10^{12}$。 直接枚举 $a$,计算最小的满足 $ab\ge m$ 的 $b$,如果 $a>b$ 则后面的情况一定是重复的。时间复杂度 $\text{O}(\ ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 153

AtCoder Beginner Contest 153 https://atcoder.jp/contests/abc153 这套比较简单。 E - Crested Ibis vs Monster 完全背包 #include <bits/stdc++.h> #define ll long long ......
Beginner AtCoder Contest 153

AtCoder Beginner Contest 296

E Transition Game 拓扑跑环。 C++ Code #include "bits/stdc++.h" using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false); cin.ti ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 ABCD

https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons ......
Beginner AtCoder Contest ABCD 296

AtCoder Beginner Contest 296

295? 上周ECF玩去了,咕咕咕 A - Alternately (abc296 a) 题目大意 给定一个包含$MF$的字符串,问是否是 $M,F$交替出现的。 解题思路 判断相邻字母是否相等即可。 神奇的代码 ```cpp #include using namespace std; using ......
Beginner AtCoder Contest 296

What is X/Y problem?

X/Y problem means you have a problem X, you think you should solve another problem Y to solve the original problem X, you ask people for help you solv ......
problem What is