Scoi2013多项式的运算

平衡树维护序列的老题。之前用SMT写过,不过在bzoj上就tle了。splay大法好。 #include <cstdio> #include <cctype> #include <cstring> #include <algorithm> using namespace std; int _d_; #define readInt(_x_) { \ int& _s_ = _x_; \ while (!isdigit(_d_ = getchar())); \ _s_ = 0; \ while ((_s_ = _s_ * 10 + _d_ - 48), isdigit(_d_ = getchar())); \ } #define readStr(_s_) { \ char* _i_ = _s_; \ while (!islower(_d_ = getchar())); \ while ((*(_i_ ++) = _d_), islower(_d_ = getchar())); \ *(_i_) = 0; \ } #define _l (long long int) const int maxn = 300009; const int mod = 20130426;...

November 26, 2014 · 5 min · laekov