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


wrong ouptut using naive method also

Guys why Im getting wrong output for 3 test cases eventhough code is very simple and solution is intuitive. Which corner case Im missing plz help me out. Thanks

problem link:-link text

My solution:-link text

asked 14 Sep '17, 08:24

code_man's gravatar image

accept rate: 11%

edited 14 Sep '17, 14:33

Can't see your code!! can you copy paste your code here?

(14 Sep '17, 08:32) kunnu1202★

Updated now plz can u find it

(14 Sep '17, 14:34) code_man2★

You are declaring mincgpa[n] and maxkt[n] before storing the total number of students in n (which is obtained as input).

scanf("%d",&n); will come first, then the declaration of the aforementioned arrays i.e. mincgpa[n] and maxkt[n].


answered 14 Sep '17, 20:55

alfarhanzahedi's gravatar image

accept rate: 40%

edited 14 Sep '17, 20:57

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: 14 Sep '17, 08:24

question was seen: 196 times

last updated: 14 Sep '17, 20:57