QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#85646 | #2056. Buddy Numbers | Zuqa# | AC ✓ | 2ms | 3592kb | C++17 | 1.2kb | 2023-03-08 00:00:38 | 2023-03-08 00:03:05 |
Judging History
answer
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define el '\n'
#define FIO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef complex<ld> pt;
typedef unsigned long long ull;
template<typename T, typename X>
using hashTable = gp_hash_table<T, X>;
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
// mt19937_64 for long long
mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count());
void doWork()
{
int n;
cin >> n;
if(n == 1)
cout << 1;
else if(n == 2)
cout << "1 2";
else if(n == 3)
cout << "3 1 2";
else if(n == 4)
cout << "3 1 2 4";
else if(n == 6)
cout << "3 6 2 4 1 5";
else
cout << -1;
}
signed main()
{
FIO
int T = 1;
// cin >> T;
for(int i = 1; i <= T; i++)
doWork();
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3472kb
input:
2
output:
1 2
result:
ok answer is OK
Test #2:
score: 0
Accepted
time: 2ms
memory: 3476kb
input:
3
output:
3 1 2
result:
ok answer is OK
Test #3:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
1
output:
1
result:
ok answer is OK
Test #4:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
4
output:
3 1 2 4
result:
ok answer is OK
Test #5:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
5
output:
-1
result:
ok answer is OK
Test #6:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
6
output:
3 6 2 4 1 5
result:
ok answer is OK
Test #7:
score: 0
Accepted
time: 2ms
memory: 3412kb
input:
7
output:
-1
result:
ok answer is OK
Test #8:
score: 0
Accepted
time: 2ms
memory: 3464kb
input:
8
output:
-1
result:
ok answer is OK
Test #9:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
9
output:
-1
result:
ok answer is OK
Test #10:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
10
output:
-1
result:
ok answer is OK
Test #11:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
11
output:
-1
result:
ok answer is OK
Test #12:
score: 0
Accepted
time: 2ms
memory: 3416kb
input:
12
output:
-1
result:
ok answer is OK
Test #13:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
13
output:
-1
result:
ok answer is OK
Test #14:
score: 0
Accepted
time: 2ms
memory: 3408kb
input:
14
output:
-1
result:
ok answer is OK
Test #15:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
15
output:
-1
result:
ok answer is OK
Test #16:
score: 0
Accepted
time: 2ms
memory: 3592kb
input:
16
output:
-1
result:
ok answer is OK
Test #17:
score: 0
Accepted
time: 2ms
memory: 3348kb
input:
17
output:
-1
result:
ok answer is OK
Test #18:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
18
output:
-1
result:
ok answer is OK
Test #19:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
19
output:
-1
result:
ok answer is OK
Test #20:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
20
output:
-1
result:
ok answer is OK
Test #21:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
30
output:
-1
result:
ok answer is OK
Test #22:
score: 0
Accepted
time: 0ms
memory: 3380kb
input:
100
output:
-1
result:
ok answer is OK
Test #23:
score: 0
Accepted
time: 0ms
memory: 3412kb
input:
288
output:
-1
result:
ok answer is OK
Test #24:
score: 0
Accepted
time: 2ms
memory: 3516kb
input:
666
output:
-1
result:
ok answer is OK
Test #25:
score: 0
Accepted
time: 2ms
memory: 3500kb
input:
1000
output:
-1
result:
ok answer is OK