HDU 5536 字典树

  题意:就是公式。 这现场赛O(n^3)能过,觉得太没天理了。   做法:字典树,枚举两个数,然后在字典树上贪心的跑。 #include <bits/stdc++.h> using namespace std; const int MAXN = 100010; struct Trie { int ch[2],size; }T[MAXN]; int root = 1,tot =
相关文章
相关标签/搜索