int ans = 0; for (int i = 30; ~i; i--) if (b[i]) // ans |= 1 << i; // ans ^= 1 << i; // ans += 1 << i;
保证没有编译错误。请问三种哪种最快。