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

Автор asif_iut, 13 лет назад, По-английски

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++ ? .

Полный текст и комментарии »

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

Автор asif_iut, 13 лет назад, По-английски

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

Полный текст и комментарии »

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

Автор asif_iut, 14 лет назад, По-английски
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 ?

Полный текст и комментарии »

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