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