0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cpp 何度でも忘れる自信のあるものたち

Last updated at Posted at 2025-08-02

lower_bound ,upper_bound

lowerは x以上をさがし、upper は x より大きいをさがす。{1,2,3,4,5,5,5,6,7} で 5を探すと lower なら 最初の5の位置、upper なら 6 の位置が返ってくる。

1<<n

1<<nは1といっているのに2^n。

if((1<<j) & i )

iとjのループでiのビット立っているところだけ何かしたい。

popcount(unsigned(x))

立っているビットの数を数えたい

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?