培訓作業-第三周(STL&USACO+4)
由于眼睛受傷了,沒有及時總結。本周弄了一下模板基本上就變成了這個樣子了:
#include<cstdio>
#include<cstring>
#include<fstream>
#include<iostream>
#include<algorithm>
using namespace std;
//
#define MM(a,i) memset(a,i,sizeof(a))
#define FOR(i,l,r) for (int i=(l);i<=(r);i++)
#define DFOR(i,r,l) for (int i=(r);i>=(l);i--)
//STL
#define BG begin()
#define ED end()
#define SZ(x) ((int)((x).size()))
#define II(i,x) __typeof((x).begin()) i
#define Foreach(i,x) for (__typeof((x).begin()) i=(x).begin();i!=(x).end();i++)
#define DForeach(i,x) for (__typeof((x).rbegin()) i=(x).rbegin();i!=(x).rend();i++)
//STL pair<a,b>
#define MP make_pair
#define FT first
#define SD second
//
typedef long long Int64;
const int INF=~0U>>2;
//
ifstream fin("A.in");
ofstream fout("A.out");
//
int main(){
fin.close();
fout.close();
return 0;
}
//
周老師發現一個重大的問題,__typeof被CCF禁掉了!!
遂不用,改用reverse_iterator 和iterator如果想寫宏定義的話可以參見http://www.shnenglu.com/MatoNo1/ 的模板
//
其實真要寫只要非STL的部分就行了。
//
然后用它刷了usaco 4道,感覺還是不在狀態,繼續恢復狀態中。
| DONE | 2012.03.06 | PROB Pollutant Control [ANALYSIS] |
| DONE | 2012.03.10 | PROB Frame Up [ANALYSIS] |
| DONE | 2012.03.10 | PROB Starry Night [ANALYSIS] |
| DONE | 2012.03.17 | PROB Musical Themes [ANALYSIS] |



