QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#139881#2056. Buddy NumbersDeadplayer#WA 1ms3636kbC++141.4kb2023-08-14 18:54:582023-08-14 18:55:01

Judging History

你现在查看的是最新测评结果

  • [2023-08-14 18:55:01]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3636kb
  • [2023-08-14 18:54:58]
  • 提交

answer

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
//Practice, Practice, Practice
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define debug(x) cerr << #x << " is " << x << endl;
#define Practice ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl '\n'
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ull unsigned long long
#define one(x) __builtin_popcount(x)
#define double long double
#define sz(x) x.size()
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update> indexed_set;
const int MAXN = 2e5 + 5, SQ = 350, mod = 1e9 + 7, INF = 1e9;
void doWork(){
    int n;
    cin >> n;
    if(n <= 4){
        if(n <= 2){
            for(int i = 1; i <= n; ++i){
                cout << i << " ";
            }
        }
        else if(n == 3){
            cout << 3 << " " << 1 << " " << 2 << endl;
        }
        else{
            cout << 3 << " " << 1 << " " << 4 << " " << 2 << endl;
         }
        return;
    }
    else{
        cout << -1 << endl;
    }
}
int32_t main(){
    Practice
    int tc = 1;
    //cin >> tc;
    while(tc--){
        doWork();
    }
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3636kb

input:

2

output:

1 2 

result:

ok answer is OK

Test #2:

score: 0
Accepted
time: 1ms
memory: 3468kb

input:

3

output:

3 1 2

result:

ok answer is OK

Test #3:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

1

output:

1 

result:

ok answer is OK

Test #4:

score: 0
Accepted
time: 1ms
memory: 3372kb

input:

4

output:

3 1 4 2

result:

ok answer is OK

Test #5:

score: 0
Accepted
time: 1ms
memory: 3464kb

input:

5

output:

-1

result:

ok answer is OK

Test #6:

score: -100
Wrong Answer
time: 1ms
memory: 3480kb

input:

6

output:

-1

result:

wrong answer answer is exist