Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
33788 | 申东铉 | 【S】T1 | C++ | 运行超时 | 20 | 1000 MS | 260 KB | 522 | 2024-10-22 15:25:05 |
//30 #include <bits/stdc++.h> #define int long long using namespace std; int l,r; inline void mian () { unordered_set <int> st; cin >> l >> r; int x = r - l + 1; for (int i = 1;i < (1 << x);++i) { int a = 0; for (int j = 0;j < x;++j) { if (i & (1 << j)) { a |= (l + j); } } st.insert(a); } cout << st.size() << endl; return; } int t; signed main () { // freopen("or.in","r",stdin); // freopen("or.out","w",stdout); cin >> t; while (t--) { mian(); } return 0; }