We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4121285 commit 67a9897Copy full SHA for 67a9897
atcoder/internal_bit.hpp
@@ -5,17 +5,29 @@
5
#include <intrin.h>
6
#endif
7
8
+#if __cplusplus >= 202002L
9
+#include <bit>
10
+#endif
11
+
12
namespace atcoder {
13
14
namespace internal {
15
16
17
18
+using std::bit_ceil;
19
20
+#else
21
22
// @return same with std::bit::bit_ceil
23
unsigned int bit_ceil(unsigned int n) {
24
unsigned int x = 1;
25
while (x < (unsigned int)(n)) x *= 2;
26
return x;
27
}
28
29
30
31
// @param n `1 <= n`
32
// @return same with std::bit::countr_zero
33
int countr_zero(unsigned int n) {
0 commit comments