2012-04-01から1ヶ月間の記事一覧
解法 セグメント木を永続データー構造化し,その上で二分探索する. 割と遅め. 実装(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>…
問題概要 日本語なので略
問題概要 日本語なので略
問題概要 日本語なので略
解法 枝刈りしつつ全探索する. 実装(C++) #include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include …</complex></deque></iostream></map></set></vector></list></algorithm></stack></queue></climits></cstdlib></cstring></cmath></cstdio>