This code was implemented using DeepSeek.(I've confirmed that the general logic is correct.)
This header file uses boost::fiber to ensure that all code runs on the same thread and voluntarily yields the CPU when a block occurs.
On the client side, cin/cout will be forwarded to pin/pout.
To achieve a single-pass compilation, cin/cout will be globally overridden; therefore, interactive libraries must use rin/rout instead of the actual stdin/stdout.
Compile using the following command source ./build.sh your_solution.cpp your_interactor.cpp {Other compilation options}
The Boost library used here is the version compiled on NOI-Linux.
If you want to replace it, you can install boost-fiber and then run -lboost-context -lboost-fiber
Unfortunately, sudo access has been disabled in our training lab, so I can't test whether this works







