Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
99112 陈志轩 二进制半整数 C++ 解答错误 60 0 MS 252 KB 854 2023-08-22 08:33:57

Tests(3/5):


#include<bits/stdc++.h> //#define int long long using namespace std; namespace Fast{ inline int fr(){ register int x = 0,f = 1; static char c = getchar(); while (c < '0' || c > '9'){ if (c == '-'){ f = -1; } c = getchar(); } while (c >= '0' && c <= '9'){ x = (x << 1) + (x << 3) + (c ^ 48); c = getchar(); } return x * f; } inline void fw(int x){ if (x < 0){ x = -x; putchar('-'); } if (x > 9){ fw(x / 10); } putchar(x % 10 + 48); } } using namespace Fast; inline int lowbit(int x){ return (x & (-x)); } void slove(){ int n = fr(); if (lowbit(n) == n){ puts("yes"); return ; } n -= lowbit(n); if (lowbit(n) == n){ puts("yes"); } else{ puts("no"); } } signed main(){ int t = fr(); while (t--){ slove(); } return 0; }


测评信息: