#define inf 999999
或者
const int inf=999999
IDE中声明LOCAL变量,然后OJ评价算法性能忽略LOCAL,实现文本读取文本定义
#ifdef LOCAL
freopen("D:\datain.txt","r",stdin);
freopen("D:\dataout.txt","w",stdout);
#endif LOCAL
IDE设置宏,VS2017: 项目属性->C/C++目录->预处理器->预处理器定义->增加LOCAL->应用