hello sir,i am fairly new in competitive coding and structures always scared me.I want to ask something related to your solution.Can you please tell me what is use of array of structure??What i am assuming that it is used to extend storage of array from one variable of one type to many variable of many different type.Correct me if i am wrong and it will be best if you(or anyone else)can elaborate about it and provide some question which can be solved using this.Thanks in advance
You are correct. Structure of array allows you to store multiple things about an object consecutively in memory and hence allows you to easily access each element. In my program, I needed to store three things about each input (starting time, end time and preferred location) and I had multiple inputs. So, instead of using three arrays, I used one structure (each with three elements) of arrays.
I have used structure many times for class assignments, but it is the first time I am using it in competitive programming. In class, it is easy as minor errors are overlooked. But not in online judge.