在TopCoder上做题目。不会用Marco是不行的,神通广大的Marco能让你的AC时间减少一半甚至以上囧。。这次我潜心研究了TopCoder上各个神牛的Marco,做了个整理。。
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define tr(i,x) for(typeof(x.begin()) i=x.begin();i!=x.end();i++)
#define all(x) x.begin(),x.end()
#define SORT(x) sort(all(x))
#define CLEAR(x) memset(x,0,sizeof(x))
#define FILL(x,c) memset(x,c,sizeof(x))
#define MP make_pair
const int inf=~0U>>1;
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vi::iterator vit;
typedef set<int> si;
typedef si::iterator sit;
typedef map<int,int> mii;
typedef mii::iterator mit;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef istringstream ISS;
typedef ostringstream OSS;
template<class T> string tostr(T a)
{
OSS out;out<<a;return out.str();
}
int main()
{
int t=100;
long long T[2];
cout<<tostr(t)<<endl;
FILL(T,-1);
cout<<T[1]<<endl;
}
orz神牛!!!!!!!!!!!!
这个显然没有ACRush的头文件NB哈哈
回复matrush:那是当然啦。。(*^__^*) 嘻嘻
囧……头文件、和typedef占了整个程序的第一页,看起来不是很爽……
回复oimaster:额。。TopCoder上面拼的就是速度所以可以一股脑搞上去。。一般的OJ上的话可以截取一点啦。。