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

Автор parth015, история, 8 лет назад, По-английски

I was solving Rebus problem on codeforceslink. I saw the editorial and greedy approach was mentioned in it. It says that we have to greedily choose number for question-mark and then proceed further and check condition. If that condition is not satisfied for all numbers between 1 and n we say that it is not possible.But I have doubt that how can we say that the number we chosen previously by greedy approach does not affect this condition. Means if we have chosen different previous number than the condition can be satisfied. Can anyone prove that greedy approach is true?

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

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

Автор parth015, история, 8 лет назад, По-английски

Hello everyone, I needed help in following problem. From editorial it is not clear. Link of problem is(http://codeforces.com/contest/165/problem/C)

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

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

Автор parth015, история, 8 лет назад, По-английски

The problem statement is following : We are required to transport a package using trucks. We are given package size and trucksize (every truck has equal capacity). The package can be repeatedly broken into half i.e 6 can be broken into 3-3 and 3 can be broken into 1 and 2. We were required to code a program which could tell the minimum amount of trucks required for given package size and trucksize.

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

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