Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow macro auto added into submit range #739

Closed
wants to merge 1 commit into from

Conversation

k88936
Copy link

@k88936 k88936 commented Dec 27, 2024

this makes this possible

#define LOCAL

//leetcode submit region begin(Prohibit modification and deletion)
#ifdef LOCAL
#define debug(x) cout << #x << " = " << x << endl
#else
#define debug(x)
#endif
class Solution {
public:
    vector<int> searchRange(vector<int>& nums, int target) {
        debug(target);
...
    }
};

//leetcode submit region end(Prohibit modification and deletion)

we can log when debuging in our local machine
and submit without deleting any line of debug(foo)

@k88936 k88936 closed this Dec 27, 2024
@k88936
Copy link
Author

k88936 commented Dec 27, 2024

cant apply to all language for example py comment start with #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant