摘要:
Splay 概念文章:http://blog.csdn.net/naivebaby/article/details/1357734叉姐 数组实现:https://github.com/ftiasch/mithril/blob/master/2012-10-24/I.cpp#L43Vani 指针实现:https://github.com/Azure-Vani/acm-icpc/blob/master/spoj/SEQ2.cpphdu 1890 写法:http://blog.csdn.net/fp_hzq/article/details/8087431HH splay写法:http://www.n 阅读全文
摘要:
int gcd( int a, int b ){ if( a == 0 ) return b; if( b == 0 ) return a; if( a%2 == 0 && b%2 == 0 ) return 2*gcd( a/2, b/2 ); else if( a%2 == 0 ) return gcd( a/2, b ); else if( b%2 == 0 ) return gcd( a, b/2 ); else return gcd( abs(a-b), min(a,b) );... 阅读全文