Блог пользователя adyyy

Автор adyyy, история, 6 лет назад, По-английски

Hey, Can we calculate LIS with queries in an online manner ?? I have read about a offline method using DAG but how to process online ?

  • Проголосовать: нравится
  • -33
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by adyyy (previous revision, new revision, compare).

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

If you mean online query is keep pushing at the back of the array, then here they are the implementations

If you only need the size of LIS

vector with binary search
fenwick tree with coordinate compression

if you want to trace back to get the LIS sequence

vector with binary search and finding LIS offline
vector with binary search and finding LIS online

Of course there are many other ways to solve LIS, and some other ways when you can push front-back and getting the size in $$$O(constant)$$$ or $$$O(polylog)$$$ while taking the LIS sequence can be done with $$$O(n)$$$ or $$$O(n\ log\ n)$$$

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

This video could be helpful (article is here). Care to elaborate what do you mean by online?

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

do you ask about CC november challange unusual queries problem? https://www.codechef.com/NOV20B/problems/UNSQUERS