백준 11053 C++ https://www.acmicpc.net/problem/11053 앞서 했던 14003번에서 조금만 들고오면 풀 수 있는 쉬운 문제였다.#include using namespace std;int n, len=0, num;int arr[1005];int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); fill(&arr[0], &arr[0] + 1005, 0); cin >> n; for (int i = 0; i > num; auto lowerPos = lower_bound(arr, arr + len, num); if (*lowerPos == 0) len++; *lowerPos = num; } cout 2025. 2. 22. 이전 1 다음