Preprocessor Solution

  • + 0 comments
    #include <limits>
    
    #define FUNCTION(func_name, oprtr) void func_name(int& a, int& b) { a = (a oprtr b) ? a : b; }
    #define io(v) cin >> v
    #define toStr(str) #str
    #define INF numeric_limits<int>::max()
    #define foreach(v, i) for(int i=0; i < static_cast<int>(v.size()); i++)