摘要:
"题目传送门" //res tp hdu 已知必定存在一个元素出现次数超过一半,考虑用栈 若当前元素等于栈顶元素,入栈,反之出栈,并将当前元素入栈 最终的栈顶元素即是所求 include include include include define rep(i,a,b) for(int i=(a); 阅读全文
摘要:
"题目传送门" //res tp hdu 数据范围1e6,若是开二维会爆 考虑用滚动数组优化 include include include include define rep(i,a,b) for(int i=(a);i=(b); i) define fo(i,a,b) for(int i =( 阅读全文
摘要:
"题目传送门" /res tp poj 白书题 尺取法例题 include include using namespace std; const int L = 100100; typedef long long ll; ll a[L],sum[L],s; int n,T; int getans() 阅读全文