CodeForces628-B.New Skateboard】的更多相关文章

B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
CD 628B 题目大意:给定一个数字(<=3*10^5),判断其能被4整除的连续子串有多少个 解题思路:注意一个整除4的性质: 若bc能被4整除,则a1a2a3a4...anbc也一定能被4整除: 利用这个性质,先特判第一位数字是否能被4整除,可以则++cnt, 之后从第二位数字开始,设当前位为i,先判断a[i]能否被4整除,可以则++cnt, 再判断a[i-1]*10+a[i]能否被4整除,可以则cnt = cnt + (i) 相关证明: 设一整数各个位置为a1,a2,a3,...,an,b…
New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a cal…
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
B. New Skateboard 题目连接: http://www.codeforces.com/contest/628/problem/A Description Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and went to ask som…
  B. New Skateboard   time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He lef…
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and went to ask some money from his parents. Meanwhile his little brother Yusuf came and started to pre…