摘要:
传送门 D.Acesrc and Hunting 将最上面两排作为中转站; 自底向下往上,之后又从上往下; 第三排开始每步长度为$2$或者$\sqrt{2}\(,上面两排步长可能为\)\sqrt{5}$。 E.Acesrc and String Theory 题意: 询问$k$循环的子串个数,$1\ 阅读全文
摘要:
2019牛客暑期多校训练营(第九场) "题目链接" A.The power of Fibonacci 注意到模数为合数,并且可以拆为$2^9,5^9$,这样就相当于将原问题拆解成了规模比较小的情况。 通过$2^9,5^9$分别求出循环节,找到问题的解,之后$CRT$合并即可。 Code cpp in 阅读全文
摘要:
Codeforces Round 579 (Div. 3) "传送门" A. Circle of Students 这题我是直接把正序、逆序的两种放在数组里面直接判断。 Code cpp include using namespace std; typedef long long ll; const 阅读全文
摘要:
Comet OJ Contest 8 "传送门" A.杀手皇后 签到。 Code cpp include using namespace std; typedef long long ll; const int N = 1e5 + 5; int n; int w[N]; ll sumv, sum; 阅读全文
摘要:
Codeforces Round 578 (Div. 2) "传送门" A. Hotelier 暴力即可。 Code cpp include using namespace std; typedef long long ll; const int N = 2e5 + 5; int t, n, m, 阅读全文