-
알면 도움되는 bitmaskTIL(today i learned)/알고리즘 2023. 7. 20. 21:15
https://www.acmicpc.net/problem/17497
2진수 연산 특징
a)2를 곱하면 현재 비트뒤에 단순히 0이추가된다.
b)현재비트의 맨뒤가 0이면 짝수,1이면 홀수 이다.
c)(X & 1)연산은 홀수이면 1 짝수이면 0
'TIL(today i learned) > 알고리즘' 카테고리의 다른 글
다익스트라 (0) 2023.07.04 트리와 그래프 (0) 2023.07.03