You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could provide an include to a header file that contains all the symbols that LeetCode uses.
The leetcode-cli cpp.run plugin already has all the information to do this since it puts all of the symbols definitions in the run file when you run a local test.
If you want to see for yourself, start a sample problem and run leetcode test 001.two-sum.cpp --local. Then take a look at the generated .tmp.cpp.run.cpp file.
The file contains all of the LeetCode specific symbols, a main method, and your Solution class copy-pasted.
My workaround for a while has been to just work directly in the generated .tmp.cpp.run.cpp file, then when I'm done I copy-paste the Solution to the actual .cpp file for the problem before submitting. A nicer approach would be awesome.
网上搜到的加头文件解决效率好低
The text was updated successfully, but these errors were encountered: