Yroot of High-Precisions (luogu P2293 [HNOI2004]高精度开根)

Background\text{Background}

I’ve accepted\text{I've accepted} a very good problem \text{ a very good problem }about High-Precisions and become\text{about High-Precisions and become}
a little interested in it. (Copy my templates.)\text{a little interested in it. (Copy my templates.)}

Description\text{Description}

Given interger N,k. Please compute kN.\text{Given interger }N,k.\text{ Please compute }^k\sqrt{N}.

Solution\text{Solution}

The easiest way I’ve got first is binary search.\text{The easiest way I've got first is binary search.}
To binary search for answer. For each answer a, use Quick-Power to \text{To binary search for answer. For each answer }a\text{, use Quick-Power to }
compute ak.\text{compute }a^k.
Time-complexity is O(logn2k).\text{Time-complexity is }O(\log n^2k).

posted @ 2019-04-28 10:05  TeacherDai  阅读(101)  评论(0)    收藏  举报