[알고리즘 ]백준 5612 - 터널의 입구와 출구 (C++) [문제 링크] : https://www.acmicpc.net/problem/5612#include using namespace std;int main(){ int N, M, A, B; cin >> N >> M; int Ans = M; for(int i=0; i> A >> B; M += A - B; if(M = Ans){ Ans = M; } } cout 알고리즘 2025.03.26