2012-04-11から1日間の記事一覧

2270-The Lth Number

AOJ

解法 セグメント木を永続データー構造化し,その上で二分探索する. 割と遅め. 実装(C++) #include <vector> #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstring> using namespace std; struct Persistent_Segtree{ int n; struct Node{ Node *left,*right; int val</cstring></cmath></algorithm></cstdio></iostream></vector>…