(Macro definition of iterator loop including integer variable quick reading, simple loop and continuous container, runtime output during debugging (compilation options should have "debug" macro definition), etc)
1/* ============================================== ========================================================== ========================================================== ========= */
2/* ============================================== ======================= code by ASM. def ============================================== =========================== */
3/* ============================================== ========================================================== ========================================================== ========= */
4 # include <cstdio>
5 # include <iostream>
6 # include <algorithm>
7 # include <cmath>
8 # include <cctype>
9 # include <memory. h>
10 # include <vector>
11 # include <set>
12 # include <string>
13 # include <cstring>
14 # include <map>
15 # include <queue>
16 # include <deque>
17 # include <stack>
18 # include <ctime>
19 # include <iterator>
20 # include <functional>
21 # include <cstdlib>
22 using namespace STD;
23/* ============================================ ============= convenient difinations ============================== ===================================== */
24 # define forall (it, V) for (_ typeof (v. begin () it = v. begin (); It <v. end (); ++ it)
25 # define Pb push_back
26 # define rep (I, j, k) for (I = J; I <= K; ++ I)
27 # define repd (I, j, k) for (I = J; I> = K; -- I)
28/* ============================================ ==================================== types ======================== ========================================================== ==== */
29 typedef long ll;
30
31/* = ======================== global variables ================================ ========================================= */
32
33/* ============================================ ================================== functions ========================== ========================================================== */
34 template <typename T>
35 void getint (T & X ){
36 char c = getchar ();
37 while (! Isdigit (c) c = getchar ();
38 X = C-'0 ';
39 while (isdigit (C = getchar () x = x * 10 + C-'0 ';
40}
41 void work (INT t ){
42
43}
44
45 int main (){
46 srand (INT) time (0 ));
47 # ifdef debug
48 assert (freopen ("test", "r", stdin ));
49 # endif
50 // ------------------------------------------------------ variables -----------------------------------------------------------
51 int T, I;
52 // ----------------------------------------------------------- work -------------------------------------------------------------
53 getint (t );
54 rep (I, 1, t) Work (I );
55
56 // bytes //----------------------------------------------------------------------------------------------------------------------
57 # ifdef debug
58 cout <(double) Clock ()/clocks_per_sec <Endl;
59 # endif
60 return 0;
61}
62/* ============================================ ========================================================== ========================================================== ========= */
ACM/CF competition getstart Template