QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#420030 | #995. 桥 | World_Creater | TL | 0ms | 0kb | C++20 | 23.1kb | 2024-05-24 14:07:46 | 2024-05-24 14:07:47 |
answer
__asm__(R"( .file "QOJ995.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "vector::_M_realloc_insert"
#NO_APP
.text
.align 2
.p2align 4
.type _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0, @function
_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0:
.LFB11729:
.cfi_startproc
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
movq %rdi, %rbp
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
subq $24, %rsp
.cfi_def_cfa_offset 80
movq 8(%rdi), %rbx
movq 16(%rdi), %rdi
cmpq %rdi, %rbx
je .L2
movl (%rsi), %eax
addq $8, %rbx
movl %eax, -8(%rbx)
movl (%rdx), %eax
movl %eax, -4(%rbx)
movq %rbx, 8(%rbp)
addq $24, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L2:
.cfi_restore_state
movq 0(%rbp), %r13
movq %rbx, %r15
movabsq $1152921504606846975, %rcx
subq %r13, %r15
movq %r15, %rax
sarq $3, %rax
cmpq %rcx, %rax
je .L22
cmpq %r13, %rbx
je .L23
leaq (%rax,%rax), %rcx
cmpq %rax, %rcx
jb .L15
testq %rcx, %rcx
jne .L24
movd (%rdx), %xmm1
movd (%rsi), %xmm0
xorl %r12d, %r12d
xorl %r14d, %r14d
punpckldq %xmm1, %xmm0
movq %xmm0, (%r15)
.L10:
subq %r13, %rbx
movq %r14, %rax
movq %r13, %rdx
addq %r14, %rbx
.p2align 4,,10
.p2align 3
.L12:
movq (%rdx), %rcx
addq $8, %rax
addq $8, %rdx
movq %rcx, -8(%rax)
cmpq %rbx, %rax
jne .L12
leaq 8(%rax), %rbx
.L11:
testq %r13, %r13
je .L13
subq %r13, %rdi
movq %rdi, %rsi
movq %r13, %rdi
call _ZdlPvm@PLT
.L13:
movq %r14, 0(%rbp)
movq %rbx, 8(%rbp)
movq %r12, 16(%rbp)
addq $24, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L23:
.cfi_restore_state
addq $1, %rax
jc .L15
movabsq $1152921504606846975, %rcx
cmpq %rcx, %rax
cmovbe %rax, %rcx
movq %rcx, %r12
salq $3, %r12
.L8:
movq %r12, %rdi
movq %rdx, 8(%rsp)
movq %rsi, (%rsp)
call _Znwm@PLT
movq 8(%rsp), %rdx
movq (%rsp), %rsi
movq 16(%rbp), %rdi
movq %rax, %r14
addq %rax, %r12
movd (%rdx), %xmm1
movd (%rsi), %xmm0
punpckldq %xmm1, %xmm0
movq %xmm0, (%rax,%r15)
cmpq %r13, %rbx
jne .L10
leaq 8(%rax), %rbx
jmp .L11
.p2align 4,,10
.p2align 3
.L15:
movabsq $9223372036854775800, %r12
jmp .L8
.L24:
movabsq $1152921504606846975, %rax
cmpq %rax, %rcx
cmova %rax, %rcx
leaq 0(,%rcx,8), %r12
jmp .L8
.L22:
leaq .LC0(%rip), %rdi
call _ZSt20__throw_length_errorPKc@PLT
.cfi_endproc
.LFE11729:
.size _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0, .-_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0
.p2align 4
.type __tcf_0, @function
__tcf_0:
.LFB11705:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
pushq %rbx
.cfi_def_cfa_offset 24
.cfi_offset 3, -24
leaq 2400096+G(%rip), %rbx
leaq -2400096(%rbx), %rbp
subq $8, %rsp
.cfi_def_cfa_offset 32
jmp .L29
.p2align 4,,10
.p2align 3
.L31:
movq 16(%rbx), %rsi
subq %rdi, %rsi
call _ZdlPvm@PLT
leaq -24(%rbx), %rax
cmpq %rbp, %rbx
je .L25
.L28:
movq %rax, %rbx
.L29:
movq (%rbx), %rdi
testq %rdi, %rdi
jne .L31
leaq -24(%rbx), %rax
cmpq %rbp, %rbx
jne .L28
.L25:
addq $8, %rsp
.cfi_def_cfa_offset 24
popq %rbx
.cfi_def_cfa_offset 16
popq %rbp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE11705:
.size __tcf_0, .-__tcf_0
.p2align 4
.globl _Z3addiii
.type _Z3addiii, @function
_Z3addiii:
.LFB9891:
.cfi_startproc
endbr64
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
movl %esi, %r15d
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
movl %edx, %r14d
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
leaq G(%rip), %r12
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
movslq %edi, %rbp
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
leaq 0(%rbp,%rbp,2), %rax
movq %rbp, %r13
leaq (%r12,%rax,8), %rax
subq $40, %rsp
.cfi_def_cfa_offset 96
movq 8(%rax), %rbx
movq 16(%rax), %rsi
cmpq %rsi, %rbx
je .L33
movl %r15d, (%rbx)
addq $8, %rbx
movl %edx, -4(%rbx)
movq %rbx, 8(%rax)
.L34:
movslq %r15d, %rbp
leaq 0(%rbp,%rbp,2), %rax
leaq (%r12,%rax,8), %rax
movq 8(%rax), %rbx
movq 16(%rax), %rsi
cmpq %rsi, %rbx
je .L44
movl %r13d, (%rbx)
addq $8, %rbx
movl %r14d, -4(%rbx)
movq %rbx, 8(%rax)
addq $40, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L33:
.cfi_restore_state
movabsq $1152921504606846975, %rcx
movq (%rax), %r9
movq %rbx, %rdx
subq %r9, %rdx
movq %rdx, %rax
sarq $3, %rax
cmpq %rcx, %rax
je .L46
cmpq %rbx, %r9
je .L71
leaq (%rax,%rax), %rcx
cmpq %rax, %rcx
jb .L56
testq %rcx, %rcx
jne .L72
movl $8, %eax
xorl %r8d, %r8d
xorl %r10d, %r10d
.L40:
addq %r10, %rdx
movl %r15d, (%rdx)
movl %r14d, 4(%rdx)
cmpq %r9, %rbx
je .L41
movq %r10, %rdx
movq %r9, %rax
.p2align 4,,10
.p2align 3
.L42:
movq (%rax), %rcx
addq $8, %rax
addq $8, %rdx
movq %rcx, -8(%rdx)
cmpq %rax, %rbx
jne .L42
subq %r9, %rbx
leaq 8(%r10,%rbx), %rax
.L41:
testq %r9, %r9
je .L43
subq %r9, %rsi
movq %r9, %rdi
movq %r8, 24(%rsp)
movq %r10, 16(%rsp)
movq %rax, 8(%rsp)
call _ZdlPvm@PLT
movq 24(%rsp), %r8
movq 16(%rsp), %r10
movq 8(%rsp), %rax
.L43:
leaq 0(%rbp,%rbp,2), %rdx
leaq (%r12,%rdx,8), %rdx
movq %r10, (%rdx)
movq %rax, 8(%rdx)
movq %r8, 16(%rdx)
jmp .L34
.p2align 4,,10
.p2align 3
.L44:
movabsq $1152921504606846975, %rcx
movq (%rax), %r8
movq %rbx, %rdx
subq %r8, %rdx
movq %rdx, %rax
sarq $3, %rax
cmpq %rcx, %rax
je .L46
cmpq %rbx, %r8
je .L73
leaq (%rax,%rax), %rcx
cmpq %rax, %rcx
jb .L59
movl $8, %eax
xorl %r15d, %r15d
xorl %r9d, %r9d
testq %rcx, %rcx
jne .L74
.L51:
addq %r9, %rdx
movl %r13d, (%rdx)
movl %r14d, 4(%rdx)
cmpq %r8, %rbx
je .L52
movq %r9, %rdx
movq %r8, %rax
.p2align 4,,10
.p2align 3
.L53:
movq (%rax), %rcx
addq $8, %rax
addq $8, %rdx
movq %rcx, -8(%rdx)
cmpq %rax, %rbx
jne .L53
subq %r8, %rbx
leaq 8(%r9,%rbx), %rax
.L52:
testq %r8, %r8
je .L54
subq %r8, %rsi
movq %r8, %rdi
movq %r9, 16(%rsp)
movq %rax, 8(%rsp)
call _ZdlPvm@PLT
movq 16(%rsp), %r9
movq 8(%rsp), %rax
.L54:
leaq 0(%rbp,%rbp,2), %rdx
leaq (%r12,%rdx,8), %rdx
movq %r9, (%rdx)
movq %rax, 8(%rdx)
movq %r15, 16(%rdx)
addq $40, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L71:
.cfi_restore_state
addq $1, %rax
jc .L56
movabsq $1152921504606846975, %rcx
cmpq %rcx, %rax
cmovbe %rax, %rcx
movq %rcx, %r8
salq $3, %r8
.L39:
movq %r8, %rdi
movq %rdx, 24(%rsp)
movq %r9, 16(%rsp)
movq %r8, 8(%rsp)
call _Znwm@PLT
movq 8(%rsp), %r8
movq 16(%rsp), %r9
movq %rax, %r10
leaq 0(%rbp,%rbp,2), %rax
movq 24(%rsp), %rdx
movq 16(%r12,%rax,8), %rsi
addq %r10, %r8
leaq 8(%r10), %rax
jmp .L40
.p2align 4,,10
.p2align 3
.L73:
addq $1, %rax
jc .L59
cmpq %rcx, %rax
cmovbe %rax, %rcx
movq %rcx, %r15
salq $3, %r15
.L50:
movq %r15, %rdi
movq %rdx, 16(%rsp)
movq %r8, 8(%rsp)
call _Znwm@PLT
movq 16(%rsp), %rdx
movq 8(%rsp), %r8
movq %rax, %r9
leaq 0(%rbp,%rbp,2), %rax
movq 16(%r12,%rax,8), %rsi
addq %r9, %r15
leaq 8(%r9), %rax
jmp .L51
.p2align 4,,10
.p2align 3
.L56:
movabsq $9223372036854775800, %r8
jmp .L39
.p2align 4,,10
.p2align 3
.L59:
movabsq $9223372036854775800, %r15
jmp .L50
.L74:
movabsq $1152921504606846975, %rax
cmpq %rax, %rcx
cmova %rax, %rcx
leaq 0(,%rcx,8), %r15
jmp .L50
.L72:
movabsq $1152921504606846975, %rax
cmpq %rax, %rcx
cmova %rax, %rcx
leaq 0(,%rcx,8), %r8
jmp .L39
.L46:
leaq .LC0(%rip), %rdi
call _ZSt20__throw_length_errorPKc@PLT
.cfi_endproc
.LFE9891:
.size _Z3addiii, .-_Z3addiii
.p2align 4
.globl _Z4dfs1i
.type _Z4dfs1i, @function
_Z4dfs1i:
.LFB9893:
.cfi_startproc
endbr64
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
movslq %edi, %rdi
leaq dfn(%rip), %r8
leaq G(%rip), %r9
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
subq $104, %rsp
.cfi_def_cfa_offset 160
movl idx(%rip), %eax
addl $1, %eax
movl %eax, idx(%rip)
movl %eax, (%r8,%rdi,4)
leaq (%rdi,%rdi,2), %rax
leaq (%r9,%rax,8), %rax
movq (%rax), %rdx
movq 8(%rax), %r12
cmpq %rdx, %r12
je .L75
movq %rdx, %rbp
leaq tree(%rip), %r10
.L94:
movslq 0(%rbp), %rax
movl (%r8,%rax,4), %edx
testl %edx, %edx
je .L106
.L77:
addq $8, %rbp
cmpq %rbp, %r12
jne .L94
.L75:
addq $104, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L106:
.cfi_restore_state
movslq 4(%rbp), %rdx
movl idx(%rip), %ecx
movb $1, (%r10,%rdx)
leal 1(%rcx), %edx
movl %edx, (%r8,%rax,4)
leaq (%rax,%rax,2), %rax
leaq (%r9,%rax,8), %rax
movl %edx, idx(%rip)
movq 8(%rax), %r14
movq (%rax), %rdx
cmpq %r14, %rdx
je .L77
movq %r12, 48(%rsp)
movq %r14, %r13
movq %rdx, %r14
movq %rbp, 56(%rsp)
.L93:
movslq (%r14), %rdx
movl (%r8,%rdx,4), %eax
testl %eax, %eax
je .L107
.L78:
addq $8, %r14
cmpq %r14, %r13
jne .L93
movq 48(%rsp), %r12
movq 56(%rsp), %rbp
jmp .L77
.p2align 4,,10
.p2align 3
.L107:
movslq 4(%r14), %rcx
movl idx(%rip), %eax
movb $1, (%r10,%rcx)
leal 1(%rax), %ecx
movl %ecx, (%r8,%rdx,4)
leaq (%rdx,%rdx,2), %rdx
leaq (%r9,%rdx,8), %rdx
movl %ecx, idx(%rip)
movq 8(%rdx), %rbp
movq (%rdx), %rcx
cmpq %rbp, %rcx
je .L78
movq %r13, 40(%rsp)
movq %rcx, %r15
movq %r14, %r13
.L92:
movslq (%r15), %rsi
movl (%r8,%rsi,4), %eax
testl %eax, %eax
je .L108
.L79:
addq $8, %r15
cmpq %r15, %rbp
jne .L92
movq %r13, %r14
movq 40(%rsp), %r13
jmp .L78
.p2align 4,,10
.p2align 3
.L108:
movslq 4(%r15), %rdi
movl idx(%rip), %eax
movb $1, (%r10,%rdi)
leal 1(%rax), %edi
movl %edi, (%r8,%rsi,4)
leaq (%rsi,%rsi,2), %rsi
leaq (%r9,%rsi,8), %rsi
movl %edi, idx(%rip)
movq 8(%rsi), %rbx
movq (%rsi), %rdi
cmpq %rbx, %rdi
je .L79
movq %rbp, 32(%rsp)
movq %r13, %rax
movq %rdi, %r12
movq %r15, %r13
.L91:
movslq (%r12), %rdi
movl (%r8,%rdi,4), %r14d
testl %r14d, %r14d
je .L109
.L80:
addq $8, %r12
cmpq %r12, %rbx
jne .L91
movq %r13, %r15
movq 32(%rsp), %rbp
movq %rax, %r13
jmp .L79
.p2align 4,,10
.p2align 3
.L109:
movslq 4(%r12), %rbp
movl idx(%rip), %ecx
movb $1, (%r10,%rbp)
leal 1(%rcx), %ebp
movl %ebp, (%r8,%rdi,4)
leaq (%rdi,%rdi,2), %rdi
leaq (%r9,%rdi,8), %rdi
movl %ebp, idx(%rip)
movq (%rdi), %r15
movq 8(%rdi), %rbp
cmpq %rbp, %r15
je .L80
movq %rbx, 24(%rsp)
movq %rax, %rcx
movq %r13, %rax
.L90:
movslq (%r15), %rdi
movl (%r8,%rdi,4), %r13d
testl %r13d, %r13d
je .L110
.L81:
addq $8, %r15
cmpq %r15, %rbp
jne .L90
movq %rax, %r13
movq 24(%rsp), %rbx
movq %rcx, %rax
jmp .L80
.p2align 4,,10
.p2align 3
.L110:
movslq 4(%r15), %rbx
movl idx(%rip), %esi
movb $1, (%r10,%rbx)
leal 1(%rsi), %ebx
movl %ebx, (%r8,%rdi,4)
leaq (%rdi,%rdi,2), %rdi
leaq (%r9,%rdi,8), %rdi
movl %ebx, idx(%rip)
movq (%rdi), %r14
movq 8(%rdi), %rbx
cmpq %rbx, %r14
je .L81
movq %rbp, 16(%rsp)
movq %rcx, %rsi
movq %r12, %rbp
movq %rax, %rcx
movq %rbx, %rax
.L89:
movslq (%r14), %rdi
movl (%r8,%rdi,4), %ebx
testl %ebx, %ebx
je .L111
.L82:
addq $8, %r14
cmpq %r14, %rax
jne .L89
movq %rcx, %rax
movq %rbp, %r12
movq %rsi, %rcx
movq 16(%rsp), %rbp
jmp .L81
.p2align 4,,10
.p2align 3
.L111:
movslq 4(%r14), %rbx
movl idx(%rip), %edx
movb $1, (%r10,%rbx)
leal 1(%rdx), %ebx
movl %ebx, (%r8,%rdi,4)
leaq (%rdi,%rdi,2), %rdi
leaq (%r9,%rdi,8), %rdi
movl %ebx, idx(%rip)
movq 8(%rdi), %r12
movq (%rdi), %rbx
cmpq %r12, %rbx
je .L82
movq %rax, 8(%rsp)
movq %r12, %rdx
movq %r14, %rax
movq %rbx, %r12
.L88:
movslq (%r12), %rdi
movl (%r8,%rdi,4), %r11d
testl %r11d, %r11d
je .L112
.L83:
addq $8, %r12
cmpq %r12, %rdx
jne .L88
movq %rax, %r14
movq 8(%rsp), %rax
jmp .L82
.p2align 4,,10
.p2align 3
.L112:
movslq 4(%r12), %rbx
movb $1, (%r10,%rbx)
movl idx(%rip), %ebx
addl $1, %ebx
movl %ebx, (%r8,%rdi,4)
leaq (%rdi,%rdi,2), %rdi
leaq (%r9,%rdi,8), %rdi
movl %ebx, idx(%rip)
movq 8(%rdi), %r14
movq (%rdi), %rbx
cmpq %r14, %rbx
je .L83
movq %rdx, (%rsp)
movq %r14, %r11
.L87:
movslq (%rbx), %rdx
movl (%r8,%rdx,4), %edi
testl %edi, %edi
je .L113
.L84:
addq $8, %rbx
cmpq %rbx, %r11
jne .L87
movq (%rsp), %rdx
jmp .L83
.p2align 4,,10
.p2align 3
.L113:
movslq 4(%rbx), %rdi
movb $1, (%r10,%rdi)
movl idx(%rip), %edi
addl $1, %edi
movl %edi, (%r8,%rdx,4)
leaq (%rdx,%rdx,2), %rdx
leaq (%r9,%rdx,8), %rdx
movl %edi, idx(%rip)
movq (%rdx), %r13
movq 8(%rdx), %r14
cmpq %r14, %r13
je .L84
movslq 0(%r13), %rdx
movq %rdx, %rdi
movl (%r8,%rdx,4), %edx
testl %edx, %edx
je .L114
.p2align 4,,10
.p2align 3
.L85:
addq $8, %r13
cmpq %r13, %r14
je .L84
movslq 0(%r13), %rdx
movq %rdx, %rdi
movl (%r8,%rdx,4), %edx
testl %edx, %edx
jne .L85
.L114:
movslq 4(%r13), %rdx
movq %rax, 88(%rsp)
movq %rcx, 80(%rsp)
movq %rsi, 72(%rsp)
movq %r11, 64(%rsp)
movb $1, (%r10,%rdx)
call _Z4dfs1i
movq 88(%rsp), %rax
movq 80(%rsp), %rcx
leaq dfn(%rip), %r8
movq 72(%rsp), %rsi
movq 64(%rsp), %r11
leaq G(%rip), %r9
leaq tree(%rip), %r10
jmp .L85
.cfi_endproc
.LFE9893:
.size _Z4dfs1i, .-_Z4dfs1i
.p2align 4
.globl _Z4dfs2ii
.type _Z4dfs2ii, @function
_Z4dfs2ii:
.LFB9904:
.cfi_startproc
endbr64
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
leaq dfn(%rip), %rdx
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
leaq low(%rip), %r13
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
movslq %edi, %r12
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
leaq (%r12,%r12,2), %rcx
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
subq $24, %rsp
.cfi_def_cfa_offset 80
movl (%rdx,%r12,4), %eax
movl %eax, 0(%r13,%r12,4)
leaq G(%rip), %rax
leaq (%rax,%rcx,8), %rax
movq (%rax), %rbx
movq 8(%rax), %r15
cmpq %rbx, %r15
je .L115
movl %esi, %r14d
leaq tree(%rip), %rcx
.L121:
movl 4(%rbx), %esi
movslq (%rbx), %rbp
cmpl %r14d, %esi
je .L118
movslq %esi, %rax
cmpb $0, (%rcx,%rax)
jne .L124
movl 0(%r13,%r12,4), %esi
movl (%rdx,%rbp,4), %eax
cmpl %esi, %eax
cmovg %esi, %eax
movl %eax, 0(%r13,%r12,4)
.L118:
addq $8, %rbx
cmpq %rbx, %r15
jne .L121
.L115:
addq $24, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L124:
.cfi_restore_state
movl %ebp, %edi
movq %rax, 8(%rsp)
call _Z4dfs2ii
movl 0(%r13,%rbp,4), %esi
movl 0(%r13,%r12,4), %edi
leaq dfn(%rip), %rdx
movl (%rdx,%r12,4), %eax
leaq tree(%rip), %rcx
cmpl %edi, %esi
cmovg %edi, %esi
movl %esi, 0(%r13,%r12,4)
cmpl %eax, 0(%r13,%rbp,4)
jle .L118
movq 8(%rsp), %rax
leaq vis(%rip), %rsi
movb $1, (%rsi,%rax)
jmp .L118
.cfi_endproc
.LFE9904:
.size _Z4dfs2ii, .-_Z4dfs2ii
.section .rodata.str1.1
.LC1:
.string " "
.LC2:
.string "\n"
.section .text.startup,"ax",@progbits
.p2align 4
.globl main
.type main, @function
main:
.LFB9905:
.cfi_startproc
endbr64
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
leaq n(%rip), %rsi
leaq _ZSt3cin(%rip), %rdi
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
subq $56, %rsp
.cfi_def_cfa_offset 112
movq %fs:40, %rax
movq %rax, 40(%rsp)
xorl %eax, %eax
call _ZNSirsERi@PLT
leaq m(%rip), %rsi
movq %rax, %rdi
call _ZNSirsERi@PLT
movl m(%rip), %esi
testl %esi, %esi
jle .L126
leaq 20(%rsp), %rax
movl $1, %ebx
leaq 36(%rsp), %r12
movq %rax, (%rsp)
leaq 24(%rsp), %rax
leaq 32(%rsp), %r14
movq %rax, 8(%rsp)
leaq G(%rip), %rbp
leaq 28(%rsp), %r13
.p2align 4,,10
.p2align 3
.L127:
movq (%rsp), %rsi
leaq _ZSt3cin(%rip), %rdi
call _ZNSirsERi@PLT
movq 8(%rsp), %rsi
movq %rax, %rdi
call _ZNSirsERi@PLT
movl 24(%rsp), %r15d
movslq 20(%rsp), %rdx
movq %r14, %rsi
leaq a(%rip), %rax
movl %ebx, 36(%rsp)
movd %r15d, %xmm1
movl %edx, 28(%rsp)
movd %edx, %xmm0
leaq (%rdx,%rdx,2), %rdx
punpckldq %xmm1, %xmm0
leaq 0(%rbp,%rdx,8), %rdi
movq %r12, %rdx
movl %r15d, 32(%rsp)
movq %xmm0, (%rax,%rbx,8)
call _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0
movslq %r15d, %rax
movq %r12, %rdx
movq %r13, %rsi
leaq (%rax,%rax,2), %rax
leaq 0(%rbp,%rax,8), %rdi
call _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0
movslq 24(%rsp), %rdx
movq %r14, %rsi
movl %ebx, 36(%rsp)
movl 20(%rsp), %r15d
addq $1, %rbx
movl %edx, 28(%rsp)
leaq (%rdx,%rdx,2), %rdx
leaq 0(%rbp,%rdx,8), %rdi
movq %r12, %rdx
movl %r15d, 32(%rsp)
call _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0
movslq %r15d, %rax
movq %r12, %rdx
movq %r13, %rsi
leaq (%rax,%rax,2), %rax
leaq 0(%rbp,%rax,8), %rdi
call _ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_.isra.0
cmpl %ebx, m(%rip)
jge .L127
movl n(%rip), %ecx
testl %ecx, %ecx
jle .L137
.L128:
leaq 24+G(%rip), %r12
movl $1, %ebp
leaq dfn(%rip), %r13
leaq tree(%rip), %r14
jmp .L136
.p2align 4,,10
.p2align 3
.L131:
addq $1, %rbp
addq $24, %r12
cmpl %ebp, n(%rip)
jl .L137
.L136:
movl 0(%r13,%rbp,4), %edx
testl %edx, %edx
jne .L131
movl idx(%rip), %eax
movq 8(%r12), %r15
movq (%r12), %rbx
addl $1, %eax
movl %eax, idx(%rip)
movl %eax, 0(%r13,%rbp,4)
cmpq %r15, %rbx
je .L135
.L134:
movslq (%rbx), %rax
movq %rax, %rdi
movl 0(%r13,%rax,4), %eax
testl %eax, %eax
je .L149
.L133:
addq $8, %rbx
cmpq %rbx, %r15
jne .L134
.L135:
xorl %esi, %esi
movl %ebp, %edi
addq $24, %r12
addq $1, %rbp
call _Z4dfs2ii
cmpl %ebp, n(%rip)
jge .L136
.L137:
movl m(%rip), %eax
leaq a(%rip), %r13
movl $1, %ebx
leaq vis(%rip), %r15
leaq _ZSt4cout(%rip), %r14
leaq 4(%r13), %r12
testl %eax, %eax
jle .L130
.p2align 4,,10
.p2align 3
.L129:
cmpb $0, (%r15,%rbx)
jne .L150
addq $1, %rbx
cmpl %ebx, %eax
jge .L129
.L130:
movq 40(%rsp), %rax
subq %fs:40, %rax
jne .L151
addq $56, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 56
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 48
popq %rbp
.cfi_def_cfa_offset 40
popq %r12
.cfi_def_cfa_offset 32
popq %r13
.cfi_def_cfa_offset 24
popq %r14
.cfi_def_cfa_offset 16
popq %r15
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L149:
.cfi_restore_state
movslq 4(%rbx), %rax
movb $1, (%r14,%rax)
call _Z4dfs1i
jmp .L133
.p2align 4,,10
.p2align 3
.L150:
movl 0(%r13,%rbx,8), %esi
movq %r14, %rdi
call _ZNSolsEi@PLT
movl $1, %edx
leaq .LC1(%rip), %rsi
movq %rax, %rdi
movq %rax, %rbp
call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
movl (%r12,%rbx,8), %esi
movq %rbp, %rdi
addq $1, %rbx
call _ZNSolsEi@PLT
movl $1, %edx
leaq .LC2(%rip), %rsi
movq %rax, %rdi
call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
movl m(%rip), %eax
cmpl %ebx, %eax
jge .L129
jmp .L130
.L126:
cmpl $0, n(%rip)
jg .L128
jmp .L130
.L151:
call __stack_chk_fail@PLT
.cfi_endproc
.LFE9905:
.size main, .-main
.p2align 4
.type _GLOBAL__sub_I_a, @function
_GLOBAL__sub_I_a:
.LFB11727:
.cfi_startproc
endbr64
leaq G(%rip), %rax
pxor %xmm0, %xmm0
leaq 2400096(%rax), %rdx
.p2align 4,,10
.p2align 3
.L153:
movaps %xmm0, (%rax)
addq $48, %rax
movaps %xmm0, -32(%rax)
movaps %xmm0, -16(%rax)
cmpq %rax, %rdx
jne .L153
leaq __dso_handle(%rip), %rdx
xorl %esi, %esi
leaq __tcf_0(%rip), %rdi
movq $0, 2400112+G(%rip)
movaps %xmm0, 2400096+G(%rip)
jmp __cxa_atexit@PLT
.cfi_endproc
.LFE11727:
.size _GLOBAL__sub_I_a, .-_GLOBAL__sub_I_a
.section .init_array,"aw"
.align 8
.quad _GLOBAL__sub_I_a
.globl idx
.bss
.align 4
.type idx, @object
.size idx, 4
idx:
.zero 4
.globl low
.align 32
.type low, @object
.size low, 400020
low:
.zero 400020
.globl dfn
.align 32
.type dfn, @object
.size dfn, 400020
dfn:
.zero 400020
.globl tree
.align 32
.type tree, @object
.size tree, 1000005
tree:
.zero 1000005
.globl vis
.align 32
.type vis, @object
.size vis, 1000005
vis:
.zero 1000005
.globl G
.align 32
.type G, @object
.size G, 2400120
G:
.zero 2400120
.globl m
.align 4
.type m, @object
.size m, 4
m:
.zero 4
.globl n
.align 4
.type n, @object
.size n, 4
n:
.zero 4
.globl a
.align 32
.type a, @object
.size a, 4000040
a:
.zero 4000040
.hidden __dso_handle
.ident "GCC: (Ubuntu 13.2.0-23ubuntu4) 13.2.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
)");
详细
Test #1:
score: 0
Time Limit Exceeded
input:
24942 387166 12556 21443 22404 16376 11073 24296 1535 11968 23745 2818 5073 12731 22550 14761 24118 12008 22695 18979 15118 13639 2080 8721 692 22578 22581 15267 9278 4127 7457 21674 17693 23448 10949 23429 9700 6009 14140 5064 7742 15164 17336 1662 18903 9760 17645 19575 6540 11942 11 4937 15282 10...