참외밭 - 2477
문제https://www.acmicpc.net/problem/2477느낀점상당히 애를 많이 먹었다.. 큰 부분에서 작은 부분을 빼줘야한다는 것은 알았지만, 작은 부분을 어떻게 계산할지에 대해 많이 고민하였다. 돌아가는 경로를 곱씹으면서 규칙을 파악하여 문제를 해결하였다.풀이#include #include #include int main(){ int K, direction, length; std::cin >> K; std::vector> move; std::map directionCount; int bigArea = 1; int smallArea = 1; for (int i = 0; i > direction >> length; directionCount[d..
2025.02.12