Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
int a[n];
for(int i=1;i<=n;i++)
{
a[i] = i;
}
for(int i=1;i<n;i+=2)
{
swap(a[i],a[i+1]);
}
for(int i=1;i<=n;i++)
{
cout << a[i];
}
cout << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1210 A. Smallest Permutation
- Contest
- Educational Round 1
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-07-14 16:35:52
- Judged At
- 2025-07-14 16:35:52
- Judged By
- Score
- 0
- Total Time
- 2ms
- Peak Memory
- 532.0 KiB