sync_with_stdio()

sync_with_stdio()

Created at : 2023-10-16 11:38
Pasted image 20231016113900.png
출처: https://cplusplus.com/reference/ios/ios_base/sync_with_stdio/

iostream과 c스타일의 stdio의 스트림의 연동을 설정한다. 기본적으로 true로 되어있다. 연동되어 있을 경우 오버헤드가 늘어나기 때문에 백준과 같은 문제풀이에서 false로 해주면 시간초과 문제가 덜 날 수 있다.

관련 문서

tie()