oi模板

 1 #include <set>
 2 #include <map>
 3 #include <ctime>
 4 #include <cmath>
 5 #include <queue>
 6 #include <vector>
 7 #include <bitset>
 8 #include <cctype>
 9 #include <cstdio>
10 #include <string>
11 #include <cstdlib>
12 #include <cstring>
13 #include <fstream>
14 #include <iostream>
15 #include <algorithm>
16  
17 #define ll long long
18 #define pii pair<int, int> 
19 #define debug(...) fprintf(stderr, __VA_ARGS__)
20  
21 #ifdef __linux__
22 #define getchar getchar_unlocked
23 #define putchar putchar_unlocked
24 #endif
25  
26 using namespace std;
27  
28 template <class t> inline bool chkmin(t &x, t y) { return x > y ? x = y, true : false; }
29 template <class t> inline bool chkmax(t &x, t y) { return x < y ? x = y, true : false; }
30  
31 template <class t> inline t &read(t &x) 
32 {
33     static int f;
34     static char c; 
35     for (f = 1; !isdigit(c = getchar()); ) if (c == '-') f = -f;
36     for (x = 0; isdigit(c); c = getchar()) x = x * 10 + c - 48;
37     return x *= f;
38 }
39  
40 template <class t> inline void write(t x, char p = '\n') 
41 {
42     static char s[25];
43     static int top = 0; 
44     if (x < 0) putchar('-'), x = -x;
45     do s[++top] = x % 10 + 48; while (x /= 10);
46     do putchar(s[top]); while (-- top);
47     putchar(p);
48 }
49 
50  
51  
52 const int oo = 0x3f3f3f3f;
53 const int mo = 1000000007;
54 const int maxn = 1e5 + 5;
55 const int maxm = 3e5 + 5;
56  
57 int n;
58 
59 inline void input()
60 {
61 }
62  
63 inline void solve()
64 {
65 }
66 
67 
68  
69 string program_name = __FILE__;
70 string iput = program_name.substr(0, program_name.length() - 4) + ".in";
71 string oput = program_name.substr(0, program_name.length() - 4) + ".out";
72  
73 //int main() __attribute__((optimize("-O2")));
74 
75 int main() 
76 {
77     if (fopen(iput.c_str(), "r") != NULL) {
78         freopen(iput.c_str(), "r", stdin);
79         freopen(oput.c_str(), "w", stdout);
80     }
81  
82     {
83         input();
84         solve();
85     }
86 
87 #ifdef jszyxw
88     cerr << (double) clock() / CLOCKS_PER_SEC << endl;
89 #endif
90  
91     fclose(stdin);
92     fclose(stdout);
93  
94     return 0;
95 }

 

posted @ 2016-07-11 22:38  jszyxw  阅读(537)  评论(0编辑  收藏  举报