QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#321136#8215. Isomorphic Delightucup-team253#AC ✓121ms52028kbC++203.8kb2024-02-04 04:58:372024-02-04 04:58:38

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

YES
0

result:

ok Everything ok

Test #2:

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

input:

6

output:

YES
6
1 2
2 3
1 3
3 4
2 5
5 6

result:

ok Everything ok

Test #3:

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

input:

4

output:

NO

result:

ok Everything ok

Test #4:

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

input:

2

output:

NO

result:

ok Everything ok

Test #5:

score: 0
Accepted
time: 5ms
memory: 3824kb

input:

3

output:

NO

result:

ok Everything ok

Test #6:

score: 0
Accepted
time: 5ms
memory: 4068kb

input:

5

output:

NO

result:

ok Everything ok

Test #7:

score: 0
Accepted
time: 35ms
memory: 41496kb

input:

7

output:

YES
6
1 2
3 4
1 3
6 7
5 6
1 5

result:

ok Everything ok

Test #8:

score: 0
Accepted
time: 22ms
memory: 41692kb

input:

8

output:

YES
6
2 3
4 5
2 4
7 8
6 7
2 6

result:

ok Everything ok

Test #9:

score: 0
Accepted
time: 25ms
memory: 41500kb

input:

9

output:

YES
7
4 5
3 4
2 3
6 7
8 9
6 8
2 6

result:

ok Everything ok

Test #10:

score: 0
Accepted
time: 34ms
memory: 41760kb

input:

10

output:

YES
8
2 3
5 6
4 5
2 4
7 8
9 10
7 9
2 7

result:

ok Everything ok

Test #11:

score: 0
Accepted
time: 33ms
memory: 41688kb

input:

11

output:

YES
9
3 4
2 3
6 7
5 6
2 5
8 9
10 11
8 10
2 8

result:

ok Everything ok

Test #12:

score: 0
Accepted
time: 34ms
memory: 41760kb

input:

12

output:

YES
10
2 3
4 5
2 4
7 8
6 7
2 6
9 10
11 12
9 11
2 9

result:

ok Everything ok

Test #13:

score: 0
Accepted
time: 29ms
memory: 41464kb

input:

13

output:

YES
11
2 3
4 5
2 4
6 7
8 9
6 8
2 6
12 13
11 12
10 11
2 10

result:

ok Everything ok

Test #14:

score: 0
Accepted
time: 34ms
memory: 41504kb

input:

14

output:

YES
12
2 3
5 6
4 5
2 4
7 8
9 10
7 9
2 7
13 14
12 13
11 12
2 11

result:

ok Everything ok

Test #15:

score: 0
Accepted
time: 37ms
memory: 41540kb

input:

15

output:

YES
13
3 4
2 3
6 7
5 6
2 5
8 9
10 11
8 10
2 8
14 15
13 14
12 13
2 12

result:

ok Everything ok

Test #16:

score: 0
Accepted
time: 24ms
memory: 41632kb

input:

16

output:

YES
13
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13

result:

ok Everything ok

Test #17:

score: 0
Accepted
time: 27ms
memory: 41564kb

input:

17

output:

YES
14
2 3
4 5
2 4
7 8
6 7
2 6
9 10
12 13
11 12
9 11
14 15
16 17
14 16
9 14

result:

ok Everything ok

Test #18:

score: 0
Accepted
time: 27ms
memory: 41676kb

input:

18

output:

YES
15
2 3
4 5
2 4
7 8
6 7
2 6
10 11
9 10
13 14
12 13
9 12
15 16
17 18
15 17
9 15

result:

ok Everything ok

Test #19:

score: 0
Accepted
time: 19ms
memory: 43672kb

input:

19

output:

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

result:

ok Everything ok

Test #20:

score: 0
Accepted
time: 34ms
memory: 41464kb

input:

598

output:

YES
544
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #21:

score: 0
Accepted
time: 26ms
memory: 41452kb

input:

245

output:

YES
221
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #22:

score: 0
Accepted
time: 39ms
memory: 41572kb

input:

793

output:

YES
724
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #23:

score: 0
Accepted
time: 27ms
memory: 41480kb

input:

133

output:

YES
119
2 3
4 5
2 4
7 8
6 7
2 6
9 10
12 13
11 12
9 11
14 15
16 17
14 16
9 14
18 19
21 22
20 21
18 20
25 26
24 25
23 24
18 23
28 29
30 31
28 30
27 28
34 35
33 34
32 33
27 32
37 38
36 37
40 41
39 40
36 39
42 43
44 45
42 44
36 42
47 48
46 47
50 51
49 50
46 49
54 55
53 54
52 53
46 52
56 57
58 59
60 61
5...

result:

ok Everything ok

Test #24:

score: 0
Accepted
time: 37ms
memory: 41540kb

input:

681

output:

YES
620
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #25:

score: 0
Accepted
time: 31ms
memory: 41480kb

input:

922

output:

YES
843
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #26:

score: 0
Accepted
time: 26ms
memory: 41568kb

input:

876

output:

YES
800
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57
...

result:

ok Everything ok

Test #27:

score: 0
Accepted
time: 31ms
memory: 41780kb

input:

7740

output:

YES
7191
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57...

result:

ok Everything ok

Test #28:

score: 0
Accepted
time: 33ms
memory: 41840kb

input:

2460

output:

YES
2268
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57...

result:

ok Everything ok

Test #29:

score: 0
Accepted
time: 28ms
memory: 41792kb

input:

7533

output:

YES
6998
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57...

result:

ok Everything ok

Test #30:

score: 0
Accepted
time: 31ms
memory: 41824kb

input:

5957

output:

YES
5527
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 57...

result:

ok Everything ok

Test #31:

score: 0
Accepted
time: 28ms
memory: 43312kb

input:

92651

output:

YES
87225
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 5...

result:

ok Everything ok

Test #32:

score: 0
Accepted
time: 27ms
memory: 42596kb

input:

58779

output:

YES
55235
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
35 36
39 40
38 39
35 38
41 42
43 44
41 43
35 41
46 47
45 46
49 50
48 49
45 48
53 54
52 53
51 52
45 51
55 56
57 58
59 60
57 5...

result:

ok Everything ok

Test #33:

score: 0
Accepted
time: 30ms
memory: 41804kb

input:

12203

output:

YES
11374
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 5...

result:

ok Everything ok

Test #34:

score: 0
Accepted
time: 23ms
memory: 42452kb

input:

55627

output:

YES
52258
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 5...

result:

ok Everything ok

Test #35:

score: 0
Accepted
time: 38ms
memory: 43400kb

input:

99051

output:

YES
93269
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 5...

result:

ok Everything ok

Test #36:

score: 0
Accepted
time: 74ms
memory: 50828kb

input:

811713

output:

YES
770513
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 ...

result:

ok Everything ok

Test #37:

score: 0
Accepted
time: 67ms
memory: 48004kb

input:

544133

output:

YES
515717
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 ...

result:

ok Everything ok

Test #38:

score: 0
Accepted
time: 38ms
memory: 45116kb

input:

276553

output:

YES
261516
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 ...

result:

ok Everything ok

Test #39:

score: 0
Accepted
time: 76ms
memory: 52028kb

input:

736904

output:

YES
699266
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 ...

result:

ok Everything ok

Test #40:

score: 0
Accepted
time: 121ms
memory: 52020kb

input:

1000000

output:

YES
949834
2 3
4 5
2 4
7 8
6 7
2 6
11 12
10 11
9 10
13 14
15 16
13 15
9 13
17 18
20 21
19 20
17 19
22 23
24 25
22 24
17 22
26 27
29 30
28 29
26 28
33 34
32 33
31 32
26 31
36 37
38 39
36 38
35 36
42 43
41 42
40 41
35 40
45 46
44 45
48 49
47 48
44 47
50 51
52 53
50 52
44 50
55 56
54 55
58 59
57 58
54 ...

result:

ok Everything ok

Extra Test:

score: 0
Extra Test Passed