Using the fact that a Python program is executed twice in the AtCoder environment, the approach is to compile the extension module written in C++ the first time and import it the second time. https://atcoder.jp/contests/cpsco2019-s1/submissions/14705333

“Oh, the ultimate weapon?” but I’m worried about how much this will affect the cost of boxing.


This page is auto-translated from /nishio/PythonでC++をコンパイル using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.