QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#798984#9670. GG and YY’s Stone GameSpinozaWA 2ms3740kbC++17521b2024-12-04 20:00:392024-12-04 20:00:45

Judging History

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

  • [2024-12-04 20:00:45]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3740kb
  • [2024-12-04 20:00:39]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for (int i=(x);i<=(y);++i)
#define per(i,x,y) for (int i=(x);i>=(y);--i)
typedef long long ll;
void solve() {
	ll n;
	cin >> n;
	if (n % 3 == 0) {
		cout << 1 << ' ' << n - 2 << '\n';
	} else { 
		cout << 0 << ' ' << (n / 3) + (n % 3) << '\n';
	}
	return;
}
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t = 1;
	cin >> t;
	while (t--) solve();
	return 0;
}
/*
1 0 1
2 0 2
3 1 1
4 0 2
5 0 3
6 1 4
7 0 3
8 0 4
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

0 1
0 2
1 1

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 3740kb

input:

10000
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
10...

output:

0 1
0 2
1 1
0 2
0 3
1 4
0 3
0 4
1 7
0 4
0 5
1 10
0 5
0 6
1 13
0 6
0 7
1 16
0 7
0 8
1 19
0 8
0 9
1 22
0 9
0 10
1 25
0 10
0 11
1 28
0 11
0 12
1 31
0 12
0 13
1 34
0 13
0 14
1 37
0 14
0 15
1 40
0 15
0 16
1 43
0 16
0 17
1 46
0 17
0 18
1 49
0 18
0 19
1 52
0 19
0 20
1 55
0 20
0 21
1 58
0 21
0 22
1 61
0 22
...

result:

wrong answer 6th lines differ - expected: '1 2', found: '1 4'