[Algorithm/C++] 1085번 ::

Sujung Shin·2022년 11월 7일
#include <iostream>
#include <algorithm>
using namespace std;

int x, y, w, h;
int tmp1, tmp2, ans;

int main() {
  ios_base::sync_with_stdio(false); cin.tie(nullptr);
  cin >> x >> y >> w >> h;
  tmp1 = min(x, y);
  tmp2 = min(w-x, h-y);
  ans = min(tmp1, tmp2);
  cout << ans;

  return 0;
}
profile
백문이불여일타

0개의 댓글