From ab7fc443ffb6d45e9d52ad1f93ce320da48b980e Mon Sep 17 00:00:00 2001 From: sh0723 Date: Wed, 1 Jul 2026 16:42:04 +0900 Subject: [PATCH] =?UTF-8?q?1285=20:=20=EB=8F=99=EC=A0=84=20=EB=92=A4?= =?UTF-8?q?=EC=A7=91=EA=B8=B0=20resolve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week4/BOJ1285/BOJ1285_V3.cpp | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/week4/BOJ1285/BOJ1285_V3.cpp diff --git a/src/week4/BOJ1285/BOJ1285_V3.cpp b/src/week4/BOJ1285/BOJ1285_V3.cpp new file mode 100644 index 0000000..0bcc304 --- /dev/null +++ b/src/week4/BOJ1285/BOJ1285_V3.cpp @@ -0,0 +1,52 @@ +#include +using namespace std; +int N; +int bit_arr[21]; +int ret = INT_MAX; +int calculate() { + int ret_val = 0; + for (int i=0; i> N; + + for (int i = 0; i < N; i++) { + string s; + cin >> s; + int num = 1; + for (int j = 0; j < s.length(); j++) { + if (s[j] == 'T') bit_arr[i] |= (1 << (num-1)); + num++; + } + } + + solve(0); + + cout << ret << '\n'; + return 0; +} \ No newline at end of file