how to solve interactive problems

interactive
problems

#1

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 ?


#2

You can learn how to solve interactive problems here

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


#3

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

https://discuss.codechef.com/questions/141708/interactive-problems-and-the-way-to-deal-with-them


#4

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 ?


#5

@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: