相关链接
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4722
神犇题解Ⅰ:http://blog.csdn.net/werkeytom_ftd/article/details/54429577
神犇题解Ⅱ:http://www.cnblogs.com/wxxlouisa/p/6139165.html
解题报告
看完题解后:果然是乱搞题!
先不管修改操作的话,如果询问的区间长度超过13的话,一定有解
相关证明可以参见:http://blog.csdn.net/werkeytom_ftd/article/details/54429577
现在考虑修改操作
因为单次询问最多涉及13个数
所以只需要支持单点查询+区间修改就可以了
于是用线段树打标记什么的就可以啦!
然而我们惊讶的发现,我们打的Tag在最后计算的时候会很大
More Formally:次数会爆 $ long long$
于是用不了快速幂了 QwQ
然后又不会了
于是接着去膜拜题解
发现我们可以用类似快速幂一样的东西搞出来
我们最终要求的是:$ {a_i}^{{3^x}}$
于是我们预处理出 $ f(i,j)$ 表示 $ {a_i}^{{3^{{2^j}}}}$
于是像快速幂一样搞一搞就可以啦!
最后我们求出了这13个数是什么,怎么判断有没有解呢?
我们可以 Meet in middle !
I have learn several good stuff here. Certainly value bookmarking for
revisiting. I wonder how a lot attempt you place to make
this type of great informative website.
Please let me know if you’re looking for a article author
for your blog. You have some really great articles and
I feel I would be a good asset. If you ever want to take some
of the load off, I’d love to write some articles for your
blog in exchange for a link back to mine. Please shoot me
an e-mail if interested. Thank you!
WOW just what I was looking for. Came here by searching for plenty of fish dating site
Hmm is anyone else experiencing problems with the pictures on this blog loading?
I’m trying to figure out if its a problem on my end or if it’s the
blog. Any suggestions would be greatly appreciated.
Way cool! Some extremely valid points! I appreciate you writing this article plus the rest of the website is also very good.
Heya are using WordPress for your site platform? I’m new to the blog
world but I’m trying to get started and create my
own. Do you require any html coding expertise to make your own blog?
Any help would be really appreciated!
Attractive section of content. I just stumbled upon your web site and in accession capital to assert
that I get actually enjoyed account your blog posts.
Any way I’ll be subscribing to your feeds and even I achievement you access consistently rapidly.
This info is worth everyone’s attention. When can I find out more?
Howdy very cool site!! Man .. Excellent .. Superb
.. I will bookmark your website and take the feeds additionally?
I am glad to find a lot of useful information here in the put up, we need
work out more techniques on this regard, thank you for sharing.
. . . . .
I know this web site gives quality dependent content and extra
information, is there any other website which provides such stuff in quality?
I loved as much as you will receive carried out right here. The sketch is attractive, your authored subject matter stylish. nonetheless, you command get bought an nervousness over that you wish be delivering the following. unwell unquestionably come further formerly again as exactly the same nearly a lot often inside case you shield this increase.
Normally I don’t learn article on blogs, but I wish to say that this write-up very compelled
me to take a look at and do it! Your writing taste has been amazed me.
Thanks, very great post.
Please let me know if you’re looking for a article writer for your site.
You have some really good articles and I believe
I would be a good asset. If you ever want to take some of the load off, I’d really like
to write some articles for your blog in exchange
for a link back to mine. Please send me an email if interested.
Thanks!
Heya i am for the primary time here. I found this board and I
to find It really helpful & it helped me out much. I’m hoping to offer
one thing again and help others like you aided me.
Wow, stunning website. Thnx …|
Hey there would you mind letting me know which hosting company you’re using?
I’ve loaded your blog in 3 different browsers and I must say this blog loads a lot
quicker then most. Can you recommend a good hosting provider at a honest price?
Thanks a lot, I appreciate it!
I’ve been exploring for a bit for any high-quality articles or weblog posts
in this sort of space . Exploring in Yahoo I eventually stumbled upon this site.
Studying this information So i’m happy to convey that I have an incredibly excellent uncanny feeling I found out just what I needed.
I so much surely will make certain to do not put out of your mind this website and provides
it a look regularly.
Wonderful goods from you, man. I’ve understand your stuff previous to and you are just extremely great.
I really like what you have acquired here, certainly like what you are saying and the way in which you say it.
You make it enjoyable and you still take care of to keep it smart.
I can’t wait to read much more from you. This is actually a
great web site.
Somebody essentially lend a hand to make severely posts I’d state.
That is the first time I frequented your web page and
to this point? I surprised with the analysis you made to make this actual submit incredible.
Wonderful activity!
Remarkable! Its in fact awesome post, I have got much clear idea on the topic of from
this piece of writing.
Thanks for your personal marvelous posting! I truly enjoyed reading it, you might be a great author.I will make sure to bookmark your blog and will often come back later in life. I want to encourage continue your great writing, have a nice evening!