06 2018 档案
摘要:C - *3 or /2 Time limit : 2sec / Memory limit : 1000MB Score: 300 points Problem Statement As AtCoder Beginner Contest 100 is taking place, the office
阅读全文
摘要:B - Ringo's Favorite Numbers Time limit : 2sec / Memory limit : 1000MB Score: 200 points Problem Statement Today, the memorable AtCoder Beginner Conte
阅读全文
摘要:A - Happy Birthday! Time limit : 2sec / Memory limit : 1000MB Score: 100 points Problem Statement E869120's and square1001's 16-th birthday is coming
阅读全文
摘要:线段树入门(分块讲解) 在一些题目涉及到区间修改和区间求和的情况,如果我们每次修改与求和的时间复杂度均为O(n)在大数据的情况下是会超时的,因此我们要引进一个维护一个区间的数据结构——线段树. [算法描述(线段树)] 线段树顾名思义就是由线段组成的树,我们知道线段有两个端点中间有一条直线,在线段树中
阅读全文
摘要:D - Good Grid Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement There is a grid with N rows and N columns of squares. Let
阅读全文
摘要:C - Strange Bank Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement To make it difficult to withdraw money, a certain bank
阅读全文
摘要: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
阅读全文
摘要:A - ABD Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Decades have passed since the beginning of AtCoder Beginner Cont
阅读全文
摘要:64位整数乘法 在部分题目中可能涉及到长整数(long long)的相关计算,可当我们需要将两个长整数相乘时有可能出现溢出的情况,这时候通常需要进行高精度计算,可如果我们需要将两个长整数相乘并 mod 一个数时高精度计算也就不太方便了,这时我们需要一个优秀的算法让我们快速的计算出类似 a×b mod
阅读全文
摘要:快速幂的递归与非递归实现 在众多题目中我们常常要计算ab mod c的数值(例如求逆元ac-2 mod c),若我们逐次乘以a记入答案中,这效率显然是非常低的.那么我们有没有办法快速地实现幂运算呢?这里我们展示一种(二进制)位运算实现快速幂的方法. [算法描述] 根据数学常识,每一个整数可以唯一地表
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号