Interactive problems are where the input given to your programs changes based on the programs response. This means that in most common competitve programming setups, the only option left is to manually interact with your solution program to check if it's correct.
However in most cases the checker programs(programs which check your solution's correctness) are easy to write. The only difficulty is in getting the checker program to interact with you solution program.
There are already solutions to this, the one over here uses croupier(a python program) to make the two interact.
However, if you have access to a linux terminal you can actually solve this problem way more easily. The following is a bash script that takes as input the names of executable files of you solution program and checker program.
sol=$1
checker=$2
mkfifo pipe_in pipe_out
./$sol < pipe_in 2> error.log | tee pipe_out &
./$checker < pipe_out | tee pipe_in
echo "------------------- Error ------------------"
cat error.log
rm error.log
rm pipe_in
rm pipe_out
Save this by the name (say) run_checker.sh. Then run the following commands.
g++ -o E E.cpp
g++ -o E_checker E_checker.cpp
chmod +x run_checker.sh
./run_checker.sh E E_checker
Here E.cpp contains your solution program and E_checker.cpp contains your checker program.