Funmondi Contest!

There is a contest being held on Funmondi named ‘Funmondi Inter School Programming Contest’. You are…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

the third sample query input is 1 7. which means one student of school1 has left,one student of school7 has entered.
but it tells
" After the third query the present schools are: 1, 2, 3, 4, 5, 6, 8."

but how someone from school 7 just entered. why is there no school no 7?

@PIS_Shami
You didn’t understand.

1 7 means one student from 7th school has left the venue.
For understanding the formats of query input, you’ll find this in the input description

1 v: One student from vth school left the venue.
2 v: One student from vth school entered the venue.

So it means first number 1 indicates leaving and 2 indicates entering and second number indicates the school no.

Hope you get it.

1 Like

This problem can solve without segment tree. Just brute force.

Can’t be solved using python :")