ios_base::sync_with_stdio(false); cin.tie(null); 구문을 추가해주는 이유
C++로 알고리즘을 풀 때 실행 속도를 높이기 위해 흔히 아래와 같은 구문을 작성해줍니다. ios_base::sync_with_stdio(false); cin.tie(null); 저 같은 경우 단순히 시간초과가 발생했을 때 남들이 위 코드를 작성하면 AC를 받을 수 있다고 하여 지속적으로 작성하고 있었는데, 어느 날 갑자기 원리가 궁금해져 찾아봤는데 내용이 흥미로워 오랜만에 포스팅을 작성합니다.