given an array arr and for each query given l,r,k to ditermine kth minimum number in the range[l,r]. how to determine kth minimum element in a given range by treap thanx in advance
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
given an array arr and for each query given l,r,k to ditermine kth minimum number in the range[l,r]. how to determine kth minimum element in a given range by treap thanx in advance
i got verdict 0 with green and can't understand find what's wrong with my solve ..i need help thanx in advance
problem link : http://www.spoj.com/problems/TREAP/ my solve : https://ideone.com/LJ6MXl
i got a unknow verdict on spoj 0 with color green . i don't know what does it mean,,can anyone explain?
i want to use a bst for each node of segment tree, then i want to union left bst and right bst into root,,,but when i implement it , it works for root successfully that means it root bst contain all element that left and right bst have and contain the property of bst but the problem is it change the data in left and right child that means for next time if i want to use the left or right bst (not root) it's not the previous bst that means it change with the union operation.
im tried like that
t->bst= unite(t->l->bst ,t->r->bst);
i want to merge the left and right bst in root and also want to the and right bst remain same....
plz anyone explin me how can i do it... thanx in advance
this is common thing that happened to me when i solve a problem and i want to submit it then i got WA because of i forgot to comment my testing file input... Now i saw that someone use this in main
freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
but i don't understand that many people use many different thing at the position "NEREVAR_PROJECT" .. then i am trying to copy that and use but it's not work in my text editor . plz explain me what is it and what it means and what it does...and how it use... thanx in advance
i used mos algo for this problem but got TLE on case 43,38 etc;;; i can't get whats wrong with me,,,i saw a solve my type but i got TLE
problem link : http://codeforces.net/contest/86/problem/D
my code : http://codeforces.net/contest/86/submission/19782537
thanx in advance
Name |
---|