QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#482999#7112. XOR CliquecloudsssWA 12ms3624kbC++14756b2024-07-18 09:17:172024-07-18 09:17:17

Judging History

你现在查看的是最新测评结果

  • [2024-07-18 09:17:17]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:3624kb
  • [2024-07-18 09:17:17]
  • 提交

answer

#include<iostream>
#include<algorithm>
#include<cstring>
#include<string>
#include<cstdio>
#include<vector>
typedef long long LL;
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        vector<int> vis(n,0);
        vector<int> num(n,0);
        for(int i=0; i<n; i++)
            cin>>num[i];
        for(int i=0; i<n; i++)
            for(int j=i+1; j<n; j++)
            {
                if((num[i]^num[j])<min(num[i],num[j]))
                {
                    vis[i]=vis[j]=1;
                }
            }
        int cnt=0;
        for(int i=0;i<n;i++)
            if(vis[i])
                cnt++;
        cout<<cnt<<endl;
    }
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3624kb

input:

3
3
1 2 3
3
1 1 1
5
1 2323 534 534 5

output:

2
3
2

result:

ok 3 number(s): "2 3 2"

Test #2:

score: -100
Wrong Answer
time: 12ms
memory: 3556kb

input:

10000
10
10 8 8 8 8 2 5 4 8 7
10
8 9 3 2 7 10 3 10 3 10
10
2 10 10 4 10 10 10 1 5 10
10
4 4 1 4 10 3 4 6 4 6
10
7 3 4 5 9 4 4 7 8 8
10
8 6 5 1 6 2 7 3 7 4
10
2 8 7 3 10 5 1 6 8 3
10
6 4 7 4 10 4 8 5 7 6
10
8 5 5 3 8 1 9 10 8 9
10
10 8 10 8 3 6 10 8 2 6
10
10 7 4 10 1 8 4 6 2 3
10
9 10 4 2 7 5 5 4 4 ...

output:

9
9
8
7
9
8
9
10
8
10
9
9
9
10
8
9
10
9
9
8
9
9
10
9
9
10
9
9
10
8
10
8
10
9
8
9
9
10
9
10
10
9
9
9
9
9
9
9
8
10
10
10
10
8
9
10
10
10
8
10
9
9
9
9
8
10
9
9
9
8
9
9
9
10
8
8
8
8
10
10
9
9
10
9
9
9
9
9
9
9
9
9
10
8
10
9
8
10
10
10
10
9
9
10
9
9
10
9
10
10
9
9
8
8
10
9
9
10
9
9
9
10
8
8
8
10
8
10
9
9
...

result:

wrong answer 1st numbers differ - expected: '6', found: '9'