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 ?
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
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 ?
Name |
---|
Auto comment: topic has been updated by adyyy (previous revision, new revision, compare).
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
if you want to trace back to get the LIS sequence
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)$$$
This video could be helpful (article is here). Care to elaborate what do you mean by online?
thanks for this resource ||
do you ask about CC november challange unusual queries problem? https://www.codechef.com/NOV20B/problems/UNSQUERS
lol it seems so. They can't even tell the difference with LIS.
Question is still open if it's about (l, r) LIS queries. Are there any sublinear algorithms (mb approximate)?
Umm actually yes but I believe it is just a subpart not the whole thing and obviously long challenges about to gather information I guess !!!
this is my full solution to your problem
why don't you wait for the editorial at the end of contest?