🎁 Exclusive Offer! Join our
Telegram Channel
to get **special discounts** and updates! 🚀
Question 52 - 100% Working Solution | Buy Now
Description
4 Live
Recruitment Software - Application Display Update
There are N applicants who have applied for a job vacancy. Each applicant has an application ID ranging from 1 to N.
During the initial round of recruitment, the company's software assigns each applicant a score value, which can be positive or negative:
- A positive score indicates the applicant is qualified for the vacancy.
- A negative score indicates the applicant is not qualified and is not visible to the recruiter.
Recruiter's Request
The recruiter wants access to all N applications, but they have a constraint of performing a maximum of K iterations to change the score values.
Operations Allowed
In each iteration, the recruiter can change the score value of the ith applicant from positive to negative or negative to positive.
If there is an (i+1)th applicant, the software automatically changes their score as well.
The goal is to ensure that all N applicants become visible to the recruiter in at most K iterations.
Input Format
First line: An integer application_size (N), representing the total number of applicants.
Second line: N space-separated integers, representing the score values of all N applicants.
Third line: An integer iterations (K), representing the maximum number of iterations allowed.
Output Format
Print space-separated integers, representing the application IDs whose scores must be changed by the recruiter in order to make all N applications visible.