From a9ce4ef3f304b0efe1c9e8c333636f31d45ddcd8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 2 Dec 2024 18:15:58 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=8A=88=20#414=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=86=94=EB=A3=A8=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1\354\202\254\352\260\201\355\230\225.cpp" | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 "Programmers/\354\265\234\354\206\214\354\247\201\354\202\254\352\260\201\355\230\225.cpp" diff --git "a/Programmers/\354\265\234\354\206\214\354\247\201\354\202\254\352\260\201\355\230\225.cpp" "b/Programmers/\354\265\234\354\206\214\354\247\201\354\202\254\352\260\201\355\230\225.cpp" new file mode 100644 index 0000000..4c6144b --- /dev/null +++ "b/Programmers/\354\265\234\354\206\214\354\247\201\354\202\254\352\260\201\355\230\225.cpp" @@ -0,0 +1,19 @@ +#include +#include + +using namespace std; + +int solution(vector> sizes) { + int maxWidth = 0; + int maxHeight = 0; + + for (const auto& size : sizes) { + int w = size[0]; + int h = size[1]; + + maxWidth = max(maxWidth, max(w, h)); + maxHeight = max(maxHeight, min(w, h)); + } + + return maxWidth * maxHeight; +} \ No newline at end of file