Pbri

摘要: 正睿noip20天冲刺 2021-10-12 A 题意 你有一个素数 \(p\) 和二元组 \((a,b)\) ,满足 \(p\nmid a+b\) ,你可以对这个二元组进行若干次操作,让他变成另一个二元组 \((c,d)\) ,操作有两种: \(\bullet\,\,\,(a,b)\rightar 阅读全文
posted @ 2021-10-12 17:14 Pbri 阅读(295) 评论(0) 推荐(0)
摘要: Codeforces Global Round 15(缺I) A 排序后看有多少个位置与初始位置不一样即可。 \(code\) : #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include 阅读全文
posted @ 2021-09-26 21:42 Pbri 阅读(74) 评论(0) 推荐(0)
摘要: 题意: 平面上给 \(n\) 个点(坐标都是整数),问有多少条过原点的直线,满足这 \(n\) 个点在这条直线上的投影是一个中心对称图形(对称中心不一定是原点),如果有多个点投影后重合在同一个点,那么只有对应的两个点上重合的点的数量相同时才认为他是中心对称图形。如果有无数条这样的直线,输出 \(-1 阅读全文
posted @ 2021-09-03 18:54 Pbri 阅读(87) 评论(0) 推荐(0)
摘要: 正睿NOIP十连测 Day1 T1 题意: 求 \(\sum_{i=1}^n\sum_{j=1}^p\varphi(i^j)\) ,\(n\le 10^7,p\le 10^9\) 题解: 考虑到 \(\varphi(i^j)=\varphi(i)\times i^{j-1}\) ,于是只需要考虑求等 阅读全文
posted @ 2021-08-30 16:36 Pbri 阅读(533) 评论(0) 推荐(1)
摘要: Codeforces Round #741 (Div. 2) 题解 A 答案就是 \(r \mod{\max(l,r/2+1)}\) \(code\) : #include <iostream> #include <cstdio> #include <algorithm> #include <cma 阅读全文
posted @ 2021-08-28 23:27 Pbri 阅读(58) 评论(0) 推荐(0)
摘要: LOJ #575. 不等关系 做题笔记 我们把这个式子看作是一堆小于号中间被几个大于号分割成了好几段,如果我们不考虑两端的交界部分的大于关系,我们就可以得到答案: \[ Ans=\dfrac{(n+1)!}{\prod len_i!} \] 然后我们考虑容斥: \(边界大于=不考虑边界大于小于-边界 阅读全文
posted @ 2021-08-26 18:36 Pbri 阅读(183) 评论(0) 推荐(0)
摘要: Codeforces Round #740 (Div. 2, based on VK Cup 2021 - Final (Engine)) 题解 ps:F莫得题解俺实在不会做/kk 2A 按照题意模拟,每模拟一遍检查一下就好了。 \(code\) : #include <iostream> #inc 阅读全文
posted @ 2021-08-25 22:03 Pbri 阅读(60) 评论(0) 推荐(0)
摘要: Codeforces Round #736 (Div. 1) 题解 A 如果一个点身边有比他大的点那么他最后一定死了,如果没有则一定不会死。 \(code\) : #include <iostream> #include <cstdio> #include <algorithm> #include 阅读全文
posted @ 2021-08-21 16:27 Pbri 阅读(120) 评论(0) 推荐(0)
摘要: Codeforces Round #739 (Div. 3) 题解 A 模拟,用的时候拿就好。 \(code\) : #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstri 阅读全文
posted @ 2021-08-19 12:09 Pbri 阅读(64) 评论(0) 推荐(0)
摘要: Codeforces Round #738 (Div. 2) 题解 A 显然的想法是先找出从中选出若干个数使得他们的 \(and\) 和最小,因为设这些位置是 \(p_1,p_2,p_3...p_k\),然后按照 \([p_1,p_2],[p_2,p_3]...[p_{k-1},p_k]\) 的操作 阅读全文
posted @ 2021-08-17 12:51 Pbri 阅读(63) 评论(0) 推荐(0)