# Can't wait for the editorials of ADAROOKS2 and BINARY

**URL:** <https://discuss.codechef.com/t/cant-wait-for-the-editorials-of-adarooks2-and-binary/25460>\
**Category:** editorial\
**Tags:** editorial\
**Created:** [May 13, 2019, 8:49am UTC](https://discuss.codechef.com/t/cant-wait-for-the-editorials-of-adarooks2-and-binary/25460 "2019-05-13T08:49:48Z")\
**Posts on this page:** 1\
**Showing post:** 43

<div class="post-metadata">

**Author:** ![psaini72](https://discuss.codechef.com/user_avatar/discuss.codechef.com/psaini72/32/254485_2.png) [@psaini72](https://discuss.codechef.com/u/psaini72)\
**Post date:** [May 13, 2019, 12:56pm UTC](https://discuss.codechef.com/t/cant-wait-for-the-editorials-of-adarooks2-and-binary/25460/43 "2019-05-13T12:56:23Z")

</div>

If this is the intended solution then I really think the time limit is unfair. I had the exact same solution but mine was taking around 6 seconds for n=2\cdot 10^6. Also, n\log^2n for n = 2\cdot 10^6 is around 8.8\cdot 10^8.

Plus the n \log n in that is from NTT/FFT which has a high constant.

_Plus_ there is an additional n \log k for actually calculating the polynomial you want to exponentiate. I even used a faster way to exponentiate ( as discussed [here](https://discuss.codechef.com/t/pfruit-editorial/19423) ) but still TLE.

If anyone got AC using NTT/FFT then I’m definitely stealing your code. 😛

---

_[View the full topic](https://discuss.codechef.com/t/cant-wait-for-the-editorials-of-adarooks2-and-binary/25460)._
