spoj 2713 Can you answer these queries IV
摘要:
http://www.spoj.pl/problems/GSS4/题意:给一个数列,有两个操作:0 L,R,把区间[L,R]内的数开平方。1 L,R,求区间[L,R]的和。思路:因为一个1e18的数开方8次后必为1,所以时间复杂度为O(8*n+n*log(n))。View Code #include<stdio.h>#include<string.h>#include<iostream>#include<math.h>#define LL long long#define lson rt<<1#define rson rt<&l 阅读全文
posted @ 2012-09-29 21:09 aigoruan 阅读(280) 评论(0) 推荐(0)
浙公网安备 33010602011771号