摘要:
__builtin_popcount()用于计算一个 32 位无符号整数有多少个位为1 Counting out the bits 可以很容易的判断一个数是不是2的幂次:清除最低的1位(见上面)并且检查结果是不是0.尽管如此,有的时候需要直到有多少个被设置了,这就相对有点难度 了。 GCC有一个叫做 阅读全文
摘要:
D. Winter is here time limit per test:3 seconds memory limit per test:256 megabytes input:standard input output:standard output Winter is here at the 阅读全文
摘要:
C. Journey time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output There are n cities and n - 1 阅读全文
摘要:
B. Game of the Rows time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Daenerys Targaryen ha 阅读全文
摘要:
A. Arya and Bran time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Bran and his older siste 阅读全文