Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cd012d6

Browse files
committed
한글 수정
1 parent ac5a8f3 commit cd012d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Programmers/Lv2/Lv2_2개이하로다른비트.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ vector<long long> solution(vector<long long> numbers) {
1010
answer.push_back(a + 1);
1111
}
1212
else { // 홀수
13-
long long last = (a+1) & -a; // 1101 -> 1110 & 0011 = 0010
14-
answer.push_back((a|last) & ~(last>>1)); // (1101 | 0010) & ~(0001) = 1111 & 1110 = 1110
13+
long long last = (a + 1) & -a; // 1101 -> 1110 & 0011 = 0010
14+
answer.push_back((a | last) & ~(last >> 1)); // (1101 | 0010) & ~(0001) = 1111 & 1110 = 1110
1515
}
1616
}
1717
return answer;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /