during break schoolchildren boy girl form queue n people canteen Initially child stand order enter canteen however boy start feel awkward stand girl queue start let girl forward second Lets describe process precisely Lets position queue sequentially number integer 1 n person position number 1 serve then time x boy stand ith position girl stand i1th position time x1 ith position girl i1th position boy the time give secondsYouve get initial position child initial moment time determine way queue go look t second