QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#769894#9428. Be Positivesyhhh1WA 0ms3692kbC++17363b2024-11-21 19:47:542024-11-21 19:47:55

Judging History

This is the latest submission verdict.

  • [2024-11-21 19:47:55]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3692kb
  • [2024-11-21 19:47:54]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;

#define int long long 
signed main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
		int ans=0;
		for(int i=0;i<n;i++)
		{
			ans=ans^i;
		}
		if(ans==0)cout<<"impossible"<<endl;
		else{
			cout<<1<<" "<<0<<" ";
			for(int i=2;i<n;i++)cout<<i<<" ";
			cout<<endl;
		}
	}
	return 0;
}

詳細信息

Test #1:

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

input:

4
1
2
3
4

output:

impossible
1 0 
1 0 2 
impossible

result:

ok 4 test cases (4 test cases)

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3692kb

input:

10
1
2
3
4
5
6
7
8
9
10

output:

impossible
1 0 
1 0 2 
impossible
1 0 2 3 4 
1 0 2 3 4 5 
1 0 2 3 4 5 6 
impossible
1 0 2 3 4 5 6 7 8 
1 0 2 3 4 5 6 7 8 9 

result:

wrong answer xor equals zero (test case 5)