이분 탐색 필요하신 분 사용하세요. int left = 0; int right = LENGTH-1; while(left ANSWER){ right = mid - 1; } else { left = mid + 1; } } C++ Fast I/O C++ Fast I/O 코드도 함께 사용할 일이 있으니 참고하세요. ios_base::sync_with_stdio(false); cin.tie(NULL); 참고 자료 Fast I/O for Competitive Programming - GeeksforGeeks A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and p..