QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#95157#5470. Hasty Santa ClausGuanYunchangWA 2ms3448kbC++141.1kb2023-04-09 11:26:232023-04-09 11:26:25

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 1
23 25
23 27
24 25
25 25
25 26

output:

23
27
24
25
26

result:

ok ok

Test #2:

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

input:

7 2
1 31
1 31
1 31
1 31
1 31
1 31
1 31

output:

1
1
2
2
3
3
4

result:

ok ok

Test #3:

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

input:

6 2
24 25
24 25
24 25
25 26
25 26
25 26

output:

24
24
25
25
26
26

result:

ok ok

Test #4:

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

input:

20 5
9 26
7 29
7 30
4 30
4 27
19 30
8 27
13 25
6 29
1 25
8 31
2 29
13 25
9 26
8 31
1 28
8 26
3 26
5 25
1 28

output:

9
7
7
4
4
19
8
13
6
1
8
2
13
9
8
1
8
3
5
1

result:

ok ok

Test #5:

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

input:

100 5
9 25
2 30
2 31
4 29
2 25
1 27
7 26
3 25
15 30
2 26
9 26
2 30
6 30
24 31
7 28
15 27
2 29
23 31
18 29
23 31
1 31
2 27
7 29
2 27
23 31
16 31
17 31
10 29
4 30
3 26
2 26
19 28
1 30
8 30
4 31
10 29
1 31
22 30
6 29
3 26
3 30
5 28
1 31
9 28
2 30
2 26
13 30
4 25
2 27
1 25
5 27
5 26
9 27
1 28
19 31
5 31...

output:

9
16
17
4
2
1
7
3
15
2
9
14
6
24
7
15
13
23
18
23
18
3
7
3
23
16
17
10
4
3
2
19
16
8
13
10
18
22
6
3
14
5
18
10
16
2
13
4
2
1
5
5
9
14
19
12
13
15
23
12
10
12
17
4
17
11
5
11
9
8
16
7
6
11
5
1
8
9
21
11
7
14
11
12
24
14
4
1
25
6
17
8
13
15
8
6
1
15
12
10

result:

ok ok

Test #6:

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

input:

100 50
3 27
6 25
1 31
2 29
24 31
5 31
14 31
9 25
11 26
25 30
7 30
24 28
10 30
2 26
1 26
1 25
6 31
23 31
5 28
4 28
2 25
1 26
4 30
6 27
7 29
11 31
3 29
23 28
3 26
4 31
10 29
1 30
8 25
17 25
7 25
8 28
23 29
1 27
1 25
6 30
1 29
13 25
5 30
1 30
1 29
2 31
9 27
4 25
1 31
1 25
18 31
3 27
12 31
7 29
13 30
1 ...

output:

3
6
1
2
24
5
14
9
11
25
7
24
10
2
1
1
6
23
5
4
2
1
4
6
7
11
3
23
3
4
10
1
8
17
7
8
23
1
1
6
1
13
5
1
1
2
9
4
1
1
18
3
12
7
13
1
1
9
6
12
1
8
3
1
2
16
1
2
10
21
1
4
9
20
1
11
7
9
14
2
6
5
7
2
4
3
20
7
18
5
1
2
9
8
18
1
3
22
3
19

result:

ok ok

Test #7:

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

input:

100 100
9 25
3 25
24 31
4 31
2 29
2 31
22 30
18 30
3 25
6 29
19 31
3 30
15 31
1 27
20 30
4 26
5 25
23 30
11 31
20 26
13 25
3 27
8 25
1 25
15 31
13 30
24 29
3 27
22 27
14 29
4 30
11 31
21 30
2 29
12 27
25 28
20 28
5 30
1 30
6 30
2 27
11 28
18 29
4 26
1 26
7 29
18 30
1 26
18 29
2 28
1 25
1 26
9 31
4 2...

output:

9
3
24
4
2
2
22
18
3
6
19
3
15
1
20
4
5
23
11
20
13
3
8
1
15
13
24
3
22
14
4
11
21
2
12
25
20
5
1
6
2
11
18
4
1
7
18
1
18
2
1
1
9
4
25
14
13
1
1
18
2
6
14
3
1
1
2
1
6
4
24
19
5
22
5
2
3
1
1
4
19
11
4
5
8
6
2
13
16
13
5
3
8
1
2
6
4
18
10
13

result:

ok ok

Test #8:

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

input:

1000 50
11 30
4 29
2 26
1 31
3 27
23 29
5 26
4 27
5 28
11 26
2 28
18 27
1 31
8 28
6 25
5 25
14 31
3 27
4 26
16 27
4 31
9 31
6 29
8 27
8 25
3 29
17 27
2 28
9 29
2 31
11 31
12 30
2 30
2 31
19 31
7 26
18 27
9 31
1 27
8 25
8 28
2 27
10 28
7 26
5 31
8 26
12 30
19 31
25 29
2 31
1 31
6 29
4 29
11 27
21 30
...

output:

11
4
2
18
3
23
5
4
5
11
3
18
18
8
6
5
14
3
4
16
13
9
6
8
8
3
17
2
9
17
11
12
16
17
19
7
18
9
1
8
8
2
10
7
9
8
12
19
25
18
19
6
4
11
21
13
5
17
10
6
6
1
13
6
16
3
16
8
5
2
3
11
12
8
16
23
21
23
7
1
13
12
20
11
6
22
17
14
6
12
1
3
1
9
15
6
1
13
10
10
9
10
5
16
12
4
12
8
5
5
2
7
6
10
10
15
13
17
17
21
...

result:

ok ok

Test #9:

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

input:

1000 100
8 28
11 29
9 30
1 28
17 25
20 29
6 26
15 25
1 28
12 30
6 31
10 31
4 27
15 28
4 31
10 25
5 30
4 25
19 31
17 27
5 28
6 31
6 31
3 29
1 29
10 31
9 30
9 31
1 31
10 31
5 28
25 29
15 27
4 31
3 31
18 27
1 31
11 26
4 30
24 29
4 31
1 27
4 25
7 31
2 26
3 31
19 31
1 28
7 25
4 27
9 27
13 26
5 26
12 30
6...

output:

8
11
9
1
17
20
6
15
1
12
6
10
4
15
4
10
5
4
19
17
5
6
6
3
1
10
9
9
3
10
5
25
15
4
3
18
3
11
4
24
4
1
4
7
2
3
19
1
7
4
9
13
5
12
6
8
11
4
14
2
4
2
12
10
2
20
21
4
17
13
21
20
6
1
2
2
12
19
22
13
1
1
3
6
8
1
6
4
7
19
2
12
8
15
6
9
22
4
1
4
18
9
4
3
17
1
4
1
8
7
2
5
11
18
4
12
5
4
14
17
4
1
6
12
24
17
...

result:

wrong answer output line is not a valid date.(line = 0)