InteractionYour program should not read or write any files. Instead, it will interact with anotherprogram provided by the scientific committee that will run at the same time with yourprogram. The interaction will take place in the following way:1. Your program will read one line from standard input containing an integer N.2. Initially, you will place N/4 boxes on the band as you wish. Your program shouldwrite N/4 lines to the standard output, in the following format: I pThe k-th line specifies the position p on the belt, where you want to place box numberk. All positions must be distinct.3. You will be required to insert N/4 more boxes, following this protocol:• Your program will read one line from standard input containing an integer bi.The new box must be inserted on any position after box number bi and beforethe next box on the belt, and it will have the next available box number
đang được dịch, vui lòng đợi..