Combinatorial - Longest Increasing Subsequence
最長増加部分列 | 動的計画法 | Aizu Online Judge
int a[1000*100+5] = {}; int main() { int n; cin >> n; fill(a, a + 1000*100+5, 1000*1000*1000*2); for (int i = 0; i < n; i++) { int t; cin >> t; *(lower_bound(a, a + 1000*100+5, t)) = t; } cout << lower_bound(a, a + 1000*100+5, 1000*1000*1000*2) - a << endl; return 0; }