Hacker News new | ask | show | jobs
by Devid2014 3755 days ago
Is this enough ?

    typedef vector<int> vi;

    typedef vector<vi> vvi;

    typedef pair<int,int> ii;

    #define sz(a) int((a).size())

    #define pb push_back

    #defile all(c) (c).begin(),(c).end()

    #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)

    #define present(c,x) ((c).find(x) != (c).end())

    #define cpresent(c,x) (find(all(c),x) != (c).end())
1 comments

That's just bad C code, and is exactly the type of stuff I'd expect on topcoder, which seems to attract the types that write incomprehensible code... but hey man, it's fast!

Just write C. C++ is too much of a pain.