[boj] (b3) 1085 직사각형에서 탈출

강신현·2022년 4월 1일
0

✅ 구현

문제

링크

코드

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
    int x, y, w, h;
    cin >> x >> y >> w >> h;

    int l1 = min(w - x, x);
    int l2 = min(h - y, y);

    cout << min(l1, l2);
}
profile
땅콩의 모험 (server)

0개의 댓글