/ SeriousOJ /

Record Detail

Wrong Answer


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

Code

#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false)
#define ct cin.tie(nullptr)
#define ll long long
#define nl '\n'
#define newline cout<<'\n'
#define yes cout<<"YES"<<'\n'
#define no cout<<"NO"<<'\n'
using namespace std;
void solve()
{
    int n;
    cin>>n;
    vector<int>arr(n);
    for(int i=0; i<n;i++)
        arr[i]=i+1;
    for(int i =0 ; i+1<n;i+=2)
        swap(arr[i],arr[i+1]);
    for(auto x:arr)
        cout<<x<<" ";
    cout<<nl;
}
int main()
{
    fast;
    ct;
    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }
}

Information

Submit By
Type
Submission
Problem
P1210 A. Smallest Permutation
Language
C++17 (G++ 13.2.0)
Submit At
2025-08-30 19:40:16
Judged At
2025-08-30 19:40:16
Judged By
Score
0
Total Time
2ms
Peak Memory
536.0 KiB