tanvir_cse's blog

By tanvir_cse, history, 8 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By tanvir_cse, history, 8 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By tanvir_cse, history, 8 years ago, In English

 i got a unknow verdict on spoj 0 with color green . i don't know what does it mean,,can anyone explain?

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

By tanvir_cse, history, 8 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By tanvir_cse, history, 8 years ago, In English

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

ifdef NEREVAR_PROJECT

freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);

endif

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

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it

By tanvir_cse, history, 8 years ago, In English

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://mirror.codeforces.com/contest/86/problem/D

my code : http://mirror.codeforces.com/contest/86/submission/19782537

thanx in advance

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it