QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#738763 | #9541. Expanding Array | zheng_zijian | WA | 0ms | 3796kb | C++20 | 465b | 2024-11-12 19:52:33 | 2024-11-12 19:52:38 |
Judging History
answer
#include <cstdio>
#include <set>
using namespace std;
void solve()
{
int n, las,now;
set<int> st;
st.insert(0);
scanf("%d",&n);
scanf("%d",&las);
st.insert(las);
for (int i = 2;i <= n;++i){
scanf("%d",&now);
st.insert(now);
st.insert(now | las);
st.insert(now & las);
st.insert(now ^ las);
}
printf("%llu\n",st.size());
}
int main()
{
solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3796kb
input:
2 2 3
output:
4
result:
ok single line: '4'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
2 3 4
output:
4
result:
ok single line: '4'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3796kb
input:
2 3 5
output:
6
result:
wrong answer 1st lines differ - expected: '8', found: '6'