diff --git a/YIM2UL2ET/README.md b/YIM2UL2ET/README.md index 170c23b..32219bb 100644 --- a/YIM2UL2ET/README.md +++ b/YIM2UL2ET/README.md @@ -13,4 +13,5 @@ | 09차시 | 2024.03.07 | 임의 정밀도 / 큰 수 연산 && 재귀 | [BOJ 1914](https://www.acmicpc.net/problem/1914) | [BOJ 1914 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/29) | | 10차시 | 2024.03.10 | 스택 | [BOJ 1406](https://www.acmicpc.net/problem/1406) | [BOJ 1406 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/31) | | 11차시 | 2024.03.18 | 스택 | [BOJ 1918](https://www.acmicpc.net/problem/1918) | [BOJ 1918 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/36) | +| 12차시 | 2024.03.28 | 비트마스킹 | [BOJ 11723](https://www.acmicpc.net/problem/11723) | [BOJ 11723 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/39) | --- diff --git "a/YIM2UL2ET/\353\271\204\355\212\270\353\247\210\354\212\244\355\202\271/12\354\260\250\354\213\234 - BOJ 11723.cpp" "b/YIM2UL2ET/\353\271\204\355\212\270\353\247\210\354\212\244\355\202\271/12\354\260\250\354\213\234 - BOJ 11723.cpp" new file mode 100644 index 0000000..c7b96fd --- /dev/null +++ "b/YIM2UL2ET/\353\271\204\355\212\270\353\247\210\354\212\244\355\202\271/12\354\260\250\354\213\234 - BOJ 11723.cpp" @@ -0,0 +1,36 @@ +#include + +int main(void) +{ + std::ios_base::sync_with_stdio(false); + std::cin.tie(NULL); + std::cout.tie(NULL); + + int n, k, bits = 0; + std::string command; + + std::cin >> n; + for (int i = 0; i < n; i++) { + std::cin >> command; + if (command == "add") { + std::cin >> k; + bits |= (1<> k; + bits &= ~(1<> k; + if (bits & (1<> k; + bits ^= (1<