반복 호출되는 함수 변수로 const를 넣을 때 주의점.
https://algospot.com/judge/problem/read/FENCE 울타리 잘라내기 문제는 분할 정복을 풀어본 사람들에게 유명한 문제이다. 대표적인 문제라고 봐도 과언이 아니다. PS 자료가 잘 정리되있기로 유명한 kks277(http://kks227.blog.me/)님의 블로그에서도 해당 문제의 백준 버전을 추천해주고 있기도 하고. 암튼, 간만에 문제를 풀다가 아무 생각 없이 한 실수이다. #include #include #include #include using namespace std; #define INF 987654321 #define ull unsigned long long #define pa vector fence; int maxSize(int left, int right) {..
PS/PS 일반
2020. 8. 21. 00:15