You are not logged in. Please login at to post your questions!


Help in Codeforces #446 A

Can anyone help me in understanding this problem Greed. It sounds simple but I don't seem to get the logic. Also the editorials don't have much

asked 18 Nov '17, 13:59

montycs's gravatar image

accept rate: 0%

Hi, Let me rephrase the question. You are given n cans, initial amount of cola present in it and also the capacity of each can. We are asked that whether any 2 cans can put all cola in it? So, we should pick the maximum and second maximum capacity cans, and check whether max1+max2 is greater than equal to all cola. Feel free to ask any questions.


answered 18 Nov '17, 14:54

gagan86nagpal's gravatar image

accept rate: 11%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 18 Nov '17, 13:59

question was seen: 225 times

last updated: 18 Nov '17, 14:54