From 6fd56c38eb2353b3ac12cfe49efb6598c32c2c87 Mon Sep 17 00:00:00 2001 From: SongSiWoon Date: Wed, 6 Jul 2022 00:46:25 +0900 Subject: [PATCH] Feat: Add solution of #118 --- src/BaekJoon/SongSiWoon/1085/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/BaekJoon/SongSiWoon/1085/main.cpp diff --git a/src/BaekJoon/SongSiWoon/1085/main.cpp b/src/BaekJoon/SongSiWoon/1085/main.cpp new file mode 100644 index 0000000..c70aae2 --- /dev/null +++ b/src/BaekJoon/SongSiWoon/1085/main.cpp @@ -0,0 +1,12 @@ +#include + +using namespace std; +int main(){ + int x, y, w, h; + scanf("%d%d%d%d", &x, &y, &w, &h); + int rx = w - x; + int ry = h - y; + int res = min({x, y, rx, ry}); + + printf("%d", res); +} \ No newline at end of file