topcoder-greed
topcoder-greed copied to clipboard
Filtering source code before submit
It would be very useful, if there would be some possibility of simple filtering of source code before submit.
For example: there is a macro DEBUG(...) in my code, which I don't want to execute on the arena, but I want to execute it locally. The proper definitions of this macro is hidden between "begin cut"/"end cut" lines and only a one additional line with dummy define:
define DEBUG(...)
is sent to arena. My problem is that this simple additional line in my template sometimes causes "to many unused code" warning (it the solutions is very short) and I lose valuable seconds to fix it. So I think that the best option for me would be removing all lines with DEBUG keyword (similar to: grep -v DEBUG), but I do not know how to automatize this process with Greed.
Edit: This idea can be simply extended further to removing all unused defines/typedefs. For example: it there is only one line with keyword VI (after applying "begin"/"end cut") then remove it (because by default this line contains a definition "typedef VI vector < int > ;").