
技巧
xiaoyu1_1
学生
展开
-
输入数据加速 scan_d();
#include #include template inline bool scan_d(T &ret){ char c;bool sgn; if(c=getchar(),c==EOF)return 0; while(c!='-'&&(c'9'))c=getchar(); sgn=(c=='-'); ret=sgn?0:(c-'0原创 2014-02-18 16:15:51 · 844 阅读 · 0 评论 -
unique函数
//对 sort(p,p+n); n=unique(p,p+n)-p;原创 2014-05-17 14:47:35 · 476 阅读 · 0 评论 -
lower_bound函数
int k = lower_bound(p,p+cnt,val)-p;原创 2014-05-17 14:50:15 · 494 阅读 · 0 评论