Skip to content

Commit 9ab5baa

Browse files
committed
updated debug.
1 parent a82e06f commit 9ab5baa

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/alfred/debug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ std::string _bin(long long v) {
3030
return res;
3131
}
3232

33+
std::string _bin(long long v, int d) {
34+
assert(v >= 0);
35+
std::string res;
36+
for (int i = d - 1; i >= 0; i--) {
37+
res += char((v >> i & 1) | 48);
38+
}
39+
return res;
40+
}
41+
3342
void __print(int x) { cerr << x; }
3443
void __print(long x) { cerr << x; }
3544
void __print(long long x) {

0 commit comments

Comments
 (0)