/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 2ms 532.0 KiB

Code

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

#define Alhamdulillah ios_base::sync_with_stdio(0), cin.tie(0);
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define db(i) cout << "db -> " << i << endl;
#define pv(v) for(auto e : v)   cout << e << " ";   cout << endl;
#define pm(m) for(auto [x,y] : m)   cout << x << " " << y << endl;   cout << endl;

void solve(){
    int tg;    cin >> tg;
    if(tg == 3)    cout << 2 << " " << 3 << " " <<  1;
    else{
        for(int i=1;i<=tg;i++){
            if(i % 2 == 1){
                if(i == tg) cout << i << " ";
                else    cout << i+1 << " ";
            }  
            else    cout << i-1 << " ";
        }
    }    
    cout << endl;
    
}

int main(){
    Alhamdulillah
    int t=1;    cin >> t;
    while(t--)  solve();
    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 15:44:52
Judged At
2025-07-14 15:44:52
Judged By
Score
0
Total Time
2ms
Peak Memory
532.0 KiB