摘要: C - Strange Bank Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement To make it difficult to withdraw money, a certain bank 阅读全文
posted @ 2018-06-11 10:37 FJ-Frank 阅读(411) 评论(0) 推荐(0)
摘要: B - Stone Monument Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement In some village, there are 999 towers that are 1,(1+2 阅读全文
posted @ 2018-06-10 23:00 FJ-Frank 阅读(348) 评论(0) 推荐(0)
摘要: A - ABD Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Decades have passed since the beginning of AtCoder Beginner Cont 阅读全文
posted @ 2018-06-10 22:42 FJ-Frank 阅读(320) 评论(0) 推荐(0)
摘要: 64位整数乘法 在部分题目中可能涉及到长整数(long long)的相关计算,可当我们需要将两个长整数相乘时有可能出现溢出的情况,这时候通常需要进行高精度计算,可如果我们需要将两个长整数相乘并 mod 一个数时高精度计算也就不太方便了,这时我们需要一个优秀的算法让我们快速的计算出类似 a×b mod 阅读全文
posted @ 2018-06-07 20:37 FJ-Frank 阅读(1291) 评论(0) 推荐(0)
摘要: 快速幂的递归与非递归实现 在众多题目中我们常常要计算ab mod c的数值(例如求逆元ac-2 mod c),若我们逐次乘以a记入答案中,这效率显然是非常低的.那么我们有没有办法快速地实现幂运算呢?这里我们展示一种(二进制)位运算实现快速幂的方法. [算法描述] 根据数学常识,每一个整数可以唯一地表 阅读全文
posted @ 2018-06-07 12:36 FJ-Frank 阅读(591) 评论(0) 推荐(0)
摘要: D - Xor Sum 2 Time limit : 2sec / Memory limit : 1024MB Score : 500 points Problem Statement There is an integer sequence A of length N. Find the numb 阅读全文
posted @ 2018-06-07 09:08 FJ-Frank 阅读(369) 评论(0) 推荐(0)
摘要: C - Attention Time limit : 2sec / Memory limit : 1024MB Score : 300 points Problem Statement There are N people standing in a row from west to east. E 阅读全文
posted @ 2018-06-07 00:14 FJ-Frank 阅读(315) 评论(0) 推荐(0)
摘要: B - Cut and Count Time limit : 2sec / Memory limit : 1024MB Score : 200 points Problem Statement You are given a string S of length N consisting of lo 阅读全文
posted @ 2018-06-06 21:31 FJ-Frank 阅读(324) 评论(0) 推荐(0)
摘要: A - Add Sub Mul Time limit : 2sec / Memory limit : 1024MB Score : 100 points Problem Statement You are given two integers A and B. Find the largest va 阅读全文
posted @ 2018-06-06 20:11 FJ-Frank 阅读(381) 评论(0) 推荐(0)