QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#32883#1861. Nondeterministic Finite AutomatonlarryzhongAC ✓2ms3652kbC++171.1kb2022-05-25 12:47:552022-05-25 12:47:57

詳細信息

Test #1:

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

input:

6

output:

9
0 1
0 3
0 4
0 5
1 2
2 3
3 4
4 5
5 1
8
0 1
0 3
0 4
0 5
3 3
4 4
5 5
1 0
6
0 1 2 3 4 5 

result:

ok n = 6

Test #2:

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

input:

20

output:

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

result:

ok n = 20