how to solve interactive problems

i dont have any idea about interactive problems as i am new to coding …can anyone tell me where i can learn to solve interactive problems ?

You can learn how to solve interactive problems here

https://codeforces.com/blog/entry/45307

1 Like

@coder_ag You can read more about interactive problems and how to deal with them here -

thankyou … but fflush(stdout) is very time consuming and program runs out of time every time …how can i reduce time complexity in this case ?

@coder_ag yes using interactive programming does take a toll on time complexity since we have to wait for the problem judge every time we make a query. Therefore, writing code having much lesser complexities is a must.

However, we can save some of the compiling time by removing the bits/std++c.h header files and only including the necessary header files as required in the program.

Also, please ensure that you are closing the output stream before ending the program. Otherwise, you may get some unexpected results.

Hope it helps :slight_smile: