ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1090. In the Army Now

I know that SBT works!
Posted by lonelycorn 1 Feb 2008 14:48
at first i wrote bst,and i got tle at testcase 3.
Now i know that i should have written SBT such as treap.
Re: I know that SBT works!
Posted by Liu Strong 4 Apr 2008 21:36
<Chinese>闫X远,“SBT”是陈启峰大牛的“Size Balanced Tree”的专用简称,和Treap不是一码事。你大概是想说“平衡二叉树”吧?这个题用SBT, Treap,或者一种O(nlogn)的基于归并排序的算法都能AC。</Chinese>
lonelycorn, the word "SBT" is for Chen Qifeng's "Size Balanced Tree", which is different from Treap. I think you were saying "Balanced BST".

And yes, treap and SBT both work, and a simple algo.,O(nlogn) based on mergesort also works.
Re: I know that SBT works!
Posted by HonoraryCoder 12 May 2008 18:21
I've written AVL Tree in Java and AC in 0.7 sec. Be careful, this solution should work fast, or will get TLE!