Wrong Answer
Code
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
int k;
cin>>k;
if(k%2 ==0){
for(int i=0; i<k; i+=2){
cout<<i+1 <<" " <<i;
}
}
else if(k%2!=0){
for(int i=0; i<k; i+=2){
cout<<i+1 <<" " <<i;
}
cout<<k-1 <<" " <<k <<" ";
}
cout<<endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1210 A. Smallest Permutation
- Contest
- Educational Round 1
- Language
- C++11 (G++ 13.2.0)
- Submit At
- 2025-07-14 16:08:34
- Judged At
- 2025-07-14 16:08:34
- Judged By
- Score
- 0
- Total Time
- 2ms
- Peak Memory
- 532.0 KiB