QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#89974#5255. Greedy DrawersGeorge_PloverAC ✓3ms3756kbC++14694b2023-03-21 21:32:202023-03-21 21:32:29

Judging History

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

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

answer

#include <cstdio>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#define MAXN 500
#define MOD
#define LL long long
using namespace std;
int n;
int a[MAXN];
void Seg(int l,int r){
    printf("%d %d\n",r,a[l]);
}
int main(){

    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        a[i]=1000-i;
        printf("%d %d\n",i,a[i]);
    }
    printf("\n");

    for(int i=1;i+7<=n;i+=8){
        Seg(i,i+2);Seg(i,i+2);Seg(i,i+2);
        Seg(i+1,i+3);Seg(i+3,i+5);
        Seg(i+4,i+7);Seg(i+4,i+7);Seg(i+4,i+7);
    }

    if(n%8){
        for(int i=1;i<=n%8;i++)
            Seg(n-n%8+1,n);
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3756kb

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: 3528kb

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: 3748kb

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: 2ms
memory: 3752kb

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: 3572kb

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: 3548kb

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: 3580kb

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: 2ms
memory: 3544kb

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: 3748kb

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: 2ms
memory: 3576kb

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: 3588kb

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: 0ms
memory: 3592kb

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: 3ms
memory: 3604kb

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: 0ms
memory: 3540kb

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: 3756kb

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: 3572kb

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: 1ms
memory: 3540kb

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: 3576kb

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: 2ms
memory: 3572kb

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: 2ms
memory: 3572kb

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