0
help to optimize code
Hello All, Below is my code: https://code.sololearn.com/c3O64jI4S5Tm input and output is explained in code. Request your view on the same in terms of optimization. Thanks a lot for your input in advance...!
2 odpowiedzi
+ 1
I recommend dropping std::regex and never to use it again in C++.
The standard library's regex is notorious for being slow.
There are some good 3rd party libraries out there, I heard of some really good template based regex library that works at compile time with c++20 if you can use that ( I forgot the name ) which I kinda doubt here.
So, unless you like to drink several cups of coffee while the program is compiling/running, I recommend just reading the numbers directly.
0
Okay