QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#633922#9354. Justifying the Conjecturewlkmok369WA 16ms3728kbC++23646b2024-10-12 16:25:072024-10-12 16:25:17

Judging History

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

  • [2024-10-12 16:25:17]
  • 评测
  • 测评结果:WA
  • 用时:16ms
  • 内存:3728kb
  • [2024-10-12 16:25:07]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define INF 0x3f
const ll mod = 1e9 + 7;
const ll MAXN = 500005;
ll _ = 1, n, m, ans = 0, a[MAXN], f[MAXN];
void solve()
{
    cin >> n;
    if (n <= 4)
    {
        cout << "-1" << '\n';
        return;
    }

    if (n % 2 == 1)
    {
        cout << 3 << ' ' << n - 3 << '\n';
    }
    else
    {
        cout << 2 << ' ' << n - 2 << '\n';
    }
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}

详细

Test #1:

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

input:

3
4
6
7

output:

-1
2 4
3 4

result:

ok ok

Test #2:

score: -100
Wrong Answer
time: 16ms
memory: 3728kb

input:

100000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
8...

output:

-1
-1
-1
-1
3 2
2 4
3 4
2 6
3 6
2 8
3 8
2 10
3 10
2 12
3 12
2 14
3 14
2 16
3 16
2 18
3 18
2 20
3 20
2 22
3 22
2 24
3 24
2 26
3 26
2 28
3 28
2 30
3 30
2 32
3 32
2 34
3 34
2 36
3 36
2 38
3 38
2 40
3 40
2 42
3 42
2 44
3 44
2 46
3 46
2 48
3 48
2 50
3 50
2 52
3 52
2 54
3 54
2 56
3 56
2 58
3 58
2 60
3 60
...

result:

wrong answer y is not a composite number 2