QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#527248#4575. Interactive Treasure HuntZhaoZiLongAC ✓4ms3688kbC++111.2kb2024-08-22 12:56:482024-08-22 12:56:49

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3688kb

input:

1
2 3
3
5
1
3
1
1

output:

SCAN 1 1
SCAN 2 1
SCAN 1 2
SCAN 2 2
DIG 1 2
DIG 1 3

result:

ok (1 test case)

Test #2:

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

input:

72
3 3
1
3
1
3
1
1
3 3
4
4
4
4
0
1
1
3 3
5
3
3
3
0
1
1
3 2
2
2
2
2
1
1
3 3
5
7
1
3
1
1
3 2
3
3
3
3
1
1
3 3
4
4
2
2
1
1
2 3
3
3
3
3
1
1
3 3
3
3
1
3
1
1
3 3
1
5
1
5
1
1
3 3
3
5
3
5
0
1
1
2 3
3
3
3
3
0
1
1
3 2
1
5
1
5
1
1
3 2
4
2
2
2
1
1
2 3
3
3
1
1
1
1
3 3
4
6
2
4
0
1
1
2 3
3
5
1
3
1
1
3 3
2
4
2
4
0
1...

output:

SCAN 1 1
SCAN 3 1
SCAN 1 1
SCAN 3 1
DIG 1 1
DIG 2 1
SCAN 1 1
SCAN 3 1
SCAN 2 2
SCAN 3 2
DIG 1 1
DIG 1 3
DIG 3 1
SCAN 1 1
SCAN 3 1
SCAN 2 2
SCAN 3 2
DIG 2 1
DIG 2 3
DIG 3 1
SCAN 1 1
SCAN 3 1
SCAN 2 1
SCAN 3 1
DIG 1 1
DIG 3 1
SCAN 1 1
SCAN 3 1
SCAN 1 3
SCAN 3 3
DIG 1 3
DIG 2 3
SCAN 1 1
SCAN 3 1
SCAN 2...

result:

ok (72 test cases)

Test #3:

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

input:

100
2 16
15
15
15
15
0
1
1
2 4
6
6
2
2
0
1
1
2 15
18
18
2
2
1
1
2 5
3
1
1
1
1
1
2 13
14
12
12
12
1
1
2 15
16
16
14
14
0
1
1
2 5
7
7
1
1
1
1
2 6
6
6
6
6
0
1
1
2 4
2
4
2
4
1
1
2 16
20
20
12
12
1
1
2 13
17
15
9
9
1
1
2 8
8
8
8
8
0
1
1
2 12
10
12
8
10
1
1
2 12
15
13
9
9
1
1
2 12
1
3
1
3
1
1
2 15
19
21
1...

output:

SCAN 1 1
SCAN 2 1
SCAN 1 8
SCAN 2 8
DIG 1 1
DIG 1 15
DIG 2 1
SCAN 1 1
SCAN 2 1
SCAN 1 3
SCAN 2 3
DIG 1 3
DIG 1 4
DIG 2 3
SCAN 1 1
SCAN 2 1
SCAN 1 9
SCAN 2 9
DIG 1 9
DIG 2 10
SCAN 1 1
SCAN 2 1
SCAN 2 1
SCAN 2 1
DIG 2 1
DIG 2 2
SCAN 1 1
SCAN 2 1
SCAN 2 7
SCAN 2 7
DIG 2 1
DIG 2 13
SCAN 1 1
SCAN 2 1
SCA...

result:

ok (100 test cases)

Test #4:

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

input:

100
7 2
6
10
2
8
1
1
10 2
17
5
1
3
1
1
12 2
9
13
7
13
1
1
6 2
11
1
1
1
1
1
14 2
16
14
10
12
1
1
7 2
7
7
7
7
1
1
16 2
21
13
7
11
1
1
13 2
8
18
4
18
1
1
15 2
8
20
4
20
1
1
9 2
6
12
6
12
0
1
1
11 2
15
9
1
7
1
1
13 2
13
15
5
13
1
1
15 2
18
12
6
12
1
1
5 2
5
3
1
3
1
1
8 2
7
9
3
9
0
1
1
11 2
8
16
4
14
1
1...

output:

SCAN 1 1
SCAN 7 1
SCAN 3 2
SCAN 7 2
DIG 2 2
DIG 4 2
SCAN 1 1
SCAN 10 1
SCAN 8 2
SCAN 10 2
DIG 8 2
DIG 9 2
SCAN 1 1
SCAN 12 1
SCAN 5 1
SCAN 12 1
DIG 2 1
DIG 9 1
SCAN 1 1
SCAN 6 1
SCAN 6 1
SCAN 6 1
DIG 6 1
DIG 6 2
SCAN 1 1
SCAN 14 1
SCAN 8 2
SCAN 14 2
DIG 3 2
DIG 13 2
SCAN 1 1
SCAN 7 1
SCAN 4 1
SCAN 7...

result:

ok (100 test cases)

Test #5:

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

input:

100
3 10
11
7
5
5
1
1
3 12
22
22
4
4
0
1
1
3 13
20
16
4
4
1
1
3 4
6
4
4
4
1
1
3 10
9
9
5
5
0
1
1
3 15
20
22
6
8
1
1
3 13
16
18
4
6
1
1
3 16
13
11
1
1
1
1
3 12
7
11
1
5
1
1
3 8
7
5
1
1
1
1
3 13
17
15
11
11
1
1
3 9
10
10
2
4
1
1
3 9
6
6
4
4
0
1
1
3 11
11
11
11
11
0
1
1
3 4
2
2
2
2
1
1
3 7
13
9
3
3
1
1...

output:

SCAN 1 1
SCAN 3 1
SCAN 3 4
SCAN 3 4
DIG 3 2
DIG 3 7
SCAN 1 1
SCAN 3 1
SCAN 2 11
SCAN 3 11
DIG 1 10
DIG 1 12
DIG 3 10
SCAN 1 1
SCAN 3 1
SCAN 3 9
SCAN 3 9
DIG 3 7
DIG 3 11
SCAN 1 1
SCAN 3 1
SCAN 2 2
SCAN 3 2
DIG 2 1
DIG 3 4
SCAN 1 1
SCAN 3 1
SCAN 2 4
SCAN 3 4
DIG 1 3
DIG 1 6
DIG 3 3
SCAN 1 1
SCAN 3 1
...

result:

ok (100 test cases)

Test #6:

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

input:

100
7 3
10
2
2
2
1
1
5 3
6
8
4
6
0
1
1
5 3
6
2
2
2
1
1
6 3
9
5
3
5
1
1
6 3
7
11
3
7
1
1
10 3
11
11
7
11
1
1
15 3
31
3
1
1
1
1
16 3
12
24
10
22
0
1
1
11 3
9
15
7
15
1
1
15 3
27
9
3
5
1
1
6 3
6
6
6
6
1
1
12 3
18
12
8
8
1
1
4 3
3
3
1
3
1
1
14 3
18
14
10
12
0
1
1
8 3
11
7
1
5
1
1
16 3
11
21
3
21
0
1
1
1...

output:

SCAN 1 1
SCAN 7 1
SCAN 6 1
SCAN 7 1
DIG 5 1
DIG 7 1
SCAN 1 1
SCAN 5 1
SCAN 2 2
SCAN 5 2
DIG 1 2
DIG 1 3
DIG 4 2
SCAN 1 1
SCAN 5 1
SCAN 4 1
SCAN 5 1
DIG 3 1
DIG 5 1
SCAN 1 1
SCAN 6 1
SCAN 4 2
SCAN 6 2
DIG 4 1
DIG 5 3
SCAN 1 1
SCAN 6 1
SCAN 2 3
SCAN 6 3
DIG 1 3
DIG 4 3
SCAN 1 1
SCAN 10 1
SCAN 5 2
SCAN...

result:

ok (100 test cases)

Test #7:

score: 0
Accepted
time: 4ms
memory: 3688kb

input:

100
10 6
15
13
1
9
1
1
4 8
1
7
1
7
1
1
2 2
1
3
1
3
1
1
15 6
10
32
6
28
0
1
1
7 4
3
11
3
11
1
1
4 4
7
3
3
3
0
1
1
12 10
26
14
6
8
1
1
11 3
8
14
8
14
1
1
6 11
16
16
4
8
0
1
1
3 11
17
15
7
7
0
1
1
7 8
12
12
8
10
1
1
16 12
16
32
10
28
0
1
1
15 11
19
31
9
21
1
1
16 9
16
26
2
22
1
1
4 16
6
8
6
8
1
1
8 9
1...

output:

SCAN 1 1
SCAN 10 1
SCAN 6 3
SCAN 10 3
DIG 6 3
DIG 6 4
SCAN 1 1
SCAN 4 1
SCAN 1 1
SCAN 4 1
DIG 1 1
DIG 1 2
SCAN 1 1
SCAN 2 1
SCAN 1 1
SCAN 2 1
DIG 1 1
DIG 1 2
SCAN 1 1
SCAN 15 1
SCAN 2 4
SCAN 15 4
DIG 1 3
DIG 1 6
DIG 4 3
SCAN 1 1
SCAN 7 1
SCAN 2 1
SCAN 7 1
DIG 1 1
DIG 3 2
SCAN 1 1
SCAN 4 1
SCAN 3 2
S...

result:

ok (100 test cases)

Test #8:

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

input:

100
11 15
20
36
10
26
0
1
1
15 11
10
18
10
18
1
1
16 13
15
37
7
31
1
1
11 16
30
24
16
16
1
1
10 12
21
9
3
5
1
1
15 11
21
15
13
13
0
1
1
13 13
31
17
11
13
0
1
1
15 14
19
21
5
15
1
1
14 10
34
8
4
4
1
1
14 15
23
35
7
25
0
1
1
11 13
25
23
15
15
0
1
1
14 15
35
19
15
15
1
1
15 15
27
29
15
21
0
1
1
11 11
2...

output:

SCAN 1 1
SCAN 11 1
SCAN 2 10
SCAN 11 10
DIG 1 6
DIG 1 14
DIG 3 6
SCAN 1 1
SCAN 15 1
SCAN 6 1
SCAN 15 1
DIG 1 1
DIG 11 1
SCAN 1 1
SCAN 16 1
SCAN 3 6
SCAN 16 6
DIG 2 4
DIG 4 9
SCAN 1 1
SCAN 11 1
SCAN 7 9
SCAN 11 9
DIG 4 5
DIG 11 14
SCAN 1 1
SCAN 10 1
SCAN 8 4
SCAN 10 4
DIG 8 3
DIG 9 5
SCAN 1 1
SCAN 15...

result:

ok (100 test cases)

Test #9:

score: 0
Accepted
time: 4ms
memory: 3608kb

input:

100
16 16
34
22
4
10
1
1
16 16
34
36
22
24
1
1
16 16
28
38
18
28
1
1
16 16
17
33
11
33
1
1
16 16
34
30
22
22
0
1
1
16 16
29
39
15
29
1
1
16 16
36
32
10
18
0
1
1
16 16
43
45
7
17
1
1
16 16
36
20
8
10
0
1
1
16 16
38
24
10
12
1
1
16 16
21
33
7
25
1
1
16 16
24
28
10
24
1
1
16 16
41
29
9
13
0
1
1
16 16
1...

output:

SCAN 1 1
SCAN 16 1
SCAN 11 7
SCAN 16 7
DIG 10 7
DIG 13 8
SCAN 1 1
SCAN 16 1
SCAN 8 11
SCAN 16 11
DIG 1 7
DIG 15 15
SCAN 1 1
SCAN 16 1
SCAN 6 10
SCAN 16 10
DIG 1 6
DIG 11 14
SCAN 1 1
SCAN 16 1
SCAN 4 6
SCAN 16 6
DIG 4 1
DIG 5 11
SCAN 1 1
SCAN 16 1
SCAN 9 9
SCAN 16 9
DIG 3 5
DIG 3 14
DIG 16 5
SCAN 1 1...

result:

ok (100 test cases)

Test #10:

score: 0
Accepted
time: 4ms
memory: 3644kb

input:

100
16 16
17
37
13
37
1
1
16 16
25
23
3
15
0
1
1
16 16
45
27
3
7
0
1
1
16 16
44
40
4
16
0
1
1
16 16
33
19
15
15
1
1
16 16
29
39
7
27
1
1
16 16
47
23
3
3
1
1
16 16
18
36
10
30
0
1
1
16 16
36
22
18
20
1
1
16 16
21
27
7
23
0
1
1
16 16
31
31
15
19
0
1
1
16 16
28
8
4
8
1
1
16 16
17
31
11
25
1
1
16 16
33
...

output:

SCAN 1 1
SCAN 16 1
SCAN 3 7
SCAN 16 7
DIG 3 1
DIG 4 13
SCAN 1 1
SCAN 16 1
SCAN 9 5
SCAN 16 5
DIG 8 5
DIG 8 6
DIG 10 5
SCAN 1 1
SCAN 16 1
SCAN 13 11
SCAN 16 11
DIG 12 11
DIG 12 12
DIG 14 11
SCAN 1 1
SCAN 16 1
SCAN 9 14
SCAN 16 14
DIG 9 13
DIG 9 16
DIG 10 13
SCAN 1 1
SCAN 16 1
SCAN 12 6
SCAN 16 6
DIG ...

result:

ok (100 test cases)

Test #11:

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

input:

100
16 16
29
19
13
17
0
1
1
16 16
35
25
15
15
0
1
1
16 16
14
34
10
30
0
1
1
16 16
55
31
1
3
1
1
16 16
18
24
18
24
1
1
16 16
28
40
16
30
0
1
1
16 16
26
46
6
28
1
1
16 16
27
27
15
17
0
1
1
16 16
19
39
13
37
0
1
1
16 16
37
29
15
21
0
1
1
16 16
24
44
14
36
0
1
1
16 16
33
53
1
25
1
1
16 16
25
33
11
25
1
...

output:

SCAN 1 1
SCAN 16 1
SCAN 11 5
SCAN 16 5
DIG 8 2
DIG 8 9
DIG 14 2
SCAN 1 1
SCAN 16 1
SCAN 11 8
SCAN 16 8
DIG 6 6
DIG 6 11
DIG 16 6
SCAN 1 1
SCAN 16 1
SCAN 3 5
SCAN 16 5
DIG 1 3
DIG 1 8
DIG 6 3
SCAN 1 1
SCAN 16 1
SCAN 14 15
SCAN 16 15
DIG 14 15
DIG 15 15
SCAN 1 1
SCAN 16 1
SCAN 7 4
SCAN 16 4
DIG 1 1
DI...

result:

ok (100 test cases)