![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
At Coder
布呗之路
每个人都有不同的路,所以每个人都会孤独。
展开
-
AtCoder Product of Arithmetic Progression
/**链接:https://atcoder.jp/contests/m-solutions2019/tasks/m_solutions2019_e题意:给出等差数列的首项x,公差d,项数n。求该等差数列的前n项积;分析:考虑从模数为1e6+3出发,很显然算法复杂度是一个多log的或者更优的写法。 tag1: d=0时,ans = ksm(x,n); tag2: d!=0 时...原创 2020-03-17 14:28:35 · 266 阅读 · 0 评论 -
AtCoder Regular Contest 097 D - Equals
BUG反馈门D - EqualsTime limit : 2sec / Memory limit : 1024MBScore : 400 pointsProblem StatementWe have a permutation of the integers from 1 through N, p1, p2, .., pN. We also have M pairs of two integers...原创 2018-05-16 23:23:40 · 467 阅读 · 0 评论 -
AtCoder Regular Contest 094 D - Worst Case(数学思维)
D - Worst CaseTime limit : 2sec / Memory limit : 256MBScore : 700 pointsProblem Statement101010 participants, including Takahashi, competed in two programming contests. In each contest, all participan...原创 2018-05-23 13:04:08 · 331 阅读 · 0 评论 -
AtCoder Grand Contest 025
A - Digits SumTime limit : 2sec / Memory limit : 1024MBScore : 200 pointsProblem StatementTakahashi has two positive integers A and B.It is known that A plus B equals N. Find the minimum possible valu...原创 2018-06-05 16:39:42 · 442 阅读 · 0 评论 -
AtCoder Beginner Contest 099 解题报告
A - ABDTime limit : 2sec / Memory limit : 256MBScore : 100 pointsProblem StatementDecades have passed since the beginning of AtCoder Beginner Contest.The contests are labeled as ABC001, ABC002, … from...原创 2018-06-13 17:42:53 · 781 阅读 · 0 评论 -
AtCoder Beginner Contest 098 D - Xor Sum 2 相同连续区间异或值等于该连续区间的和的区间的个数
D - Xor Sum 2Time limit : 2sec / Memory limit : 1024MBScore : 500 pointsProblem StatementThere is an integer sequence A of length N.Find the number of the pairs of integers l and r (1≤l≤r≤N) that sati...原创 2018-05-31 08:45:30 · 652 阅读 · 0 评论 -
序列异或和
【题意】给定n个数的数组A和数组B,求所有A[i]+B[j]的异或和(1<=i,j<=n)。n<=200000。【算法】二分+模拟【题解】将答案分成(A[i]+B[j]-A[i]^B[j])的异或和 以及 A[i]^B[j]的异或和,即单独考虑进位(后面部分很好算)。二进制题目必须拆位,通过进位使第k位+1的数对必须满足 ( A[i] & ((1<<k...原创 2018-12-06 22:15:38 · 1279 阅读 · 0 评论 -
AtCoder Grand Contest 031 A--C
A - Colorful Subsequence/**题意:给定目标串S(由小写字母构成),统计取出S的字符组成的不同串的个数;define :不同串: 1 :不同位置的相同字符 2 :一个串不存在相同的字符思路:统计每个小写字母的数量,考虑每个字母存在 取1个与不取 的情况,累乘即可最后去除空的情况*/#include&...原创 2019-03-17 15:07:13 · 472 阅读 · 0 评论