QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#707590 | #8835. Goodman | senak# | WA | 0ms | 5704kb | C++20 | 559b | 2024-11-03 16:41:29 | 2024-11-03 16:41:34 |
Judging History
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();
}
Details
Tip: Click on the bar to expand more detailed information
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)