QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#707590#8835. Goodmansenak#WA 0ms5704kbC++20559b2024-11-03 16:41:292024-11-03 16:41:34

Judging History

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

  • [2024-11-03 16:41:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:5704kb
  • [2024-11-03 16:41:29]
  • 提交

answer

#include <iostream>
#include<set>
#include <cstring>
#include<vector>
#include <algorithm>
#include<map>
#define int long long
using namespace std;
const int N =1e6 + 10;
int a[N];
int res[N];
void solve() {
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		if (a[i] == i) {
			res[i] = i;
		}
		else {
			res[i] = i;
		}
	}
	//1 2 3 4 5 6
	//6 1 5 2 4 3
	//1 6 4 5 3 2


	for (int i = 1; i <= n; i++) {
		cout << res[i] << ' ';
	}
	cout << endl;
}
signed main() {
	int t; cin >> t;
	while (t--)solve();
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 5704kb

input:

2
4
1 2 3 4
6
6 5 4 3 2 1

output:

1 2 3 4 
1 2 3 4 5 6 

result:

wrong answer Jury found better answer than participant (test case 2)