asif_iut's blog

By asif_iut, 12 years ago, In English

A few days ago i saw a screencast ( forget the name of the coder and the site ) which used code snippets and i thought it was useful . So, i searched the internet to learn how to create code snippets in Visual C++ 2010 but all the articles refer to C# snippets. Is there any way to create snippets for  C++ ? .

Full text and comments »

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

By asif_iut, 12 years ago, In English

how to find the Longest Common Subsequence ( LCS ) of  N strings ? is there any dp recurrence ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By asif_iut, 13 years ago, In English
Given a list of advertisements for a building choose the ones which maximized the total income from the advertisements. Each advertisements spans the whole face of the building, so no two advertisements can occupy the same floor and no floors can be partially occupied.

Input starts with an integer N, denoting the total number of advertisements. Each advertisements is described using three integers, A ( 0 <= A <= 10 ^ 5 ) , B( 1 <= B <= 10 ^ 5 ) and C ( 1 <= C <= 1000 ) denoting the lowest floor of the advertisement, the number of floor the advertisement covers( including the lowest floor ) and the money earned from placing it, respectively.


Sample Input:
3
1 5 1
2 10 3
7 12 1

Ans : 3

how can this problem be solved ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it