I recently found the opperator co_await
and co_yield
in C++. How should I apply this into the code and should I use these operator in competitive programming ?
Sorry for my bad English and knowledge.
If I am wrong about something please guide me.
Thanks for reading <3
I'm not too familiar with C++, but perhaps you can use it to build lazy sequences: https://medium.com/@buckaroo.pm/introducing-conduit-lazy-sequences-using-the-coroutine-ts-b7e87dd85fcf
Other than that, I doubt you'd see much use for concurrency in CP. Maybe it could be occasionally used to send an "interrupt" when you're getting close to the time limit for certain randomized or approximation algorithms (e.g. 364D - Ghd), but such problems are rare.
ok, nice
https://en.cppreference.com/w/cpp/language/coroutines From this site you can be something about it... Sir
Thanks but what is "sir" meaning ?