-
Notifications
You must be signed in to change notification settings - Fork 0
Home
GitDeveloperKim edited this page Apr 15, 2021
·
44 revisions
한 주에 5개씩만 풀자!!
- 일반적으로 1억번 이상 연산을 수행하면 죽음
- boolean 값은 false로 초기화 된다
- int[] 값은 0으로 초기화 된다
- 1<<n : 2^n
- i&(1<<j) : 계산 결과는 i의 j번째 비트가 1인지 아닌지 의미한다
- if ((num & 1) == 0) : 짝수 홀수 판단, 나머지 연산자보다 효율이 좋다
- 비트 연산자 ^를 두번 연산하면 처음 값을 반환
- start(s) end(e)
- from to
- cur next
- left(l) right(r)
- u v w
- answer
- visited[], d[], Arr[], input[]
- Tree, Node, Point, Edge, Graph
- adj, mat
dx = {0, -1, 0, 1} // 동서남북
dy = {1, 0, -1, 0}
public static int[] Dx = new int[]{-2, -2, -1, -1, 1, 1, 2, 2}; // 체스 말
public static int[] Dy = new int[]{1, -1, 2, -2, 2, -2, 1, -1};
x,y = 2,2 // 현재 위치
nx = x + dx[i]
ny = y + dy[i]
arr[ny][nx] // 반대로 넣어야 x,y 의미
- 발머의 피크 이론이란, 프로그래머의 혈중 알콜 농도가 0.129%~0.138% 사이일 때 초인적인 코딩 실력을 발휘한다는 이론이다. click