C++ tricks(codeforces.com)
codeforces.com
C++ tricks
http://codeforces.com/blog/entry/15643
2 comments
>#include <bits/stdc++.h>
This is a very cool trick to turn your compile time from seconds to minutes.
This is a very cool trick to turn your compile time from seconds to minutes.
- in 1 all variable declarations and initializations are split. That seems to stem from pre-C99 and makes no sense, especially not when they are on consecutive lines anyway.
- 3 'simply use #include <bits/stdc++.h>' No, don't do that. Instead properly learn what each header is for. Moreover it's not even a standard header so non-portable.
- 4 'hidden functions' Again non-portable and doesn't have much to do with c++ anyway
- '" \n"[j == m]' yes that's a trick to have save one line of code at the expense of being hard to understand and way more error prone
- '#define mt make_tuple' why would you obscure your code like that by saving 8 or so characters