diff --git a/src/week6/BOJ11053/BOJ11053_V1.cpp b/src/week6/BOJ11053/BOJ11053_V1.cpp new file mode 100644 index 0000000..f2d96f4 --- /dev/null +++ b/src/week6/BOJ11053/BOJ11053_V1.cpp @@ -0,0 +1,28 @@ +#include +using namespace std; +vector lis; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + + int N; + cin >> N; + + for (int i=0; i> num; + auto _pos = lower_bound(lis.begin(),lis.end(), num); + if (_pos == lis.end()) { + lis.push_back(num); + } else { + *_pos = num; + } + } + + cout << lis.size() << '\n'; + + + return 0; +}