×

# COOLING - getting WA

 0 For the COOLING (easy) problem, I have submitted this answer. I am getting correct answers in the test cases provided. Apart from that, I have tried atleast 20 different cases. And nowhere am I getting an incorrect answer. So, why am I getting WA? Is it related to the bubble sort that I have used? asked 24 Sep '13, 22:04 26●2●5●8 accept rate: 0%

 2 For input: 1 5 100 55 50 30 20 99 45 40 20 10  your program returns 4. answered 24 Sep '13, 22:13 16.9k●49●115●225 accept rate: 11% Thanks a lot! I made a silly logical error. Again, thanks! (24 Sep '13, 22:20) Max N is 30 and max T is 30 too, so bubble sort is not a problem, but you should learn how to use sorting. http://www.cplusplus.com/reference/cstdlib/qsort/ http://www.cplusplus.com/reference/algorithm/sort/ (24 Sep '13, 22:23)
 0 your solution fails for this test case 1 4 2 5 6 7 2 3 6 7 ans is 3 where as your solution gives 4 answered 24 Sep '13, 22:18 470●4●5 accept rate: 40%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×1,056
×775
×29

question asked: 24 Sep '13, 22:04

question was seen: 983 times

last updated: 24 Sep '13, 22:23