QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#102744#5255. Greedy Drawersfz_zsl#AC ✓3ms3712kbC++17558b2023-05-03 16:56:282023-05-03 16:56:32

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-03 16:56:32]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3712kb
  • [2023-05-03 16:56:28]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int N;
int main() {
	cin >> N;
	for (int i = 1; i <= N; i++) printf("%d %d\n", i, 1000 - i);
	putchar('\n');
	for (int l = 1; l <= N; l += 8) {
		if (l + 7 <= N) {
			for (int j = 0; j <= 7; j++) {
				int i = j + l;
				if (j != 3) {
					printf("%d %d\n", (i / 4 + 1 - (j == 7)) * 4, 999 - (i / 4 - (j == 7)) * 4);
				} else {
					printf("%d %d\n", i + 1, 1000 - i);
				}
			}
		} else {
			for (int j = l; j <= N; j++) {
				printf("%d %d\n", j, 1000 - j);
			}
		}
	}	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3496kb

input:

150

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #2:

score: 0
Accepted
time: 2ms
memory: 3576kb

input:

151

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #3:

score: 0
Accepted
time: 2ms
memory: 3460kb

input:

152

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #4:

score: 0
Accepted
time: 3ms
memory: 3520kb

input:

153

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #5:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

154

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #6:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

155

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #7:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

156

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #8:

score: 0
Accepted
time: 3ms
memory: 3592kb

input:

157

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #9:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

158

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #10:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

159

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #11:

score: 0
Accepted
time: 2ms
memory: 3436kb

input:

160

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #12:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

161

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #13:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

162

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #14:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

163

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #15:

score: 0
Accepted
time: 2ms
memory: 3440kb

input:

164

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #16:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

165

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #17:

score: 0
Accepted
time: 2ms
memory: 3516kb

input:

166

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #18:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

167

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #19:

score: 0
Accepted
time: 0ms
memory: 3460kb

input:

168

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy

Test #20:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

250

output:

1 999
2 998
3 997
4 996
5 995
6 994
7 993
8 992
9 991
10 990
11 989
12 988
13 987
14 986
15 985
16 984
17 983
18 982
19 981
20 980
21 979
22 978
23 977
24 976
25 975
26 974
27 973
28 972
29 971
30 970
31 969
32 968
33 967
34 966
35 965
36 964
37 963
38 962
39 961
40 960
41 959
42 958
43 957
44 956
4...

result:

ok you killed Janko's strategy