文件输入输出
#define DEBUG
int main(){
#ifdef DEBUG
freopen("input.in", "r", stdin);
//freopen("output.out", "w", stdout);
#endif
int n;
scanf("%d",&n);
//cout << "Hello world!" << endl;
return 0;
}
程序计时
#include<iostream>
#include<ctime>
using namespace std;
#define DEBUG
int main(){
int n;
scanf("%d",&n);
//cout << "Hello world!" << endl;
#ifdef DEBUG
printf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif
return 0;
}