Help Chef
CodeChefOpen on judge ↗
Chef is P.T. instuctor of a school. There are N students standing in a line in increasing order of their heights. Now Chef is given an integer X. He has to tell the position of the first student in the line with height X . If no student exists with height X , print "-1" without quotes Input The first line contains an integer N,which denotes number of students. The second line contains N space s
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start