id int64 0 14.1k | problem_id int64 1 1.31k | problem_title stringclasses 441
values | difficulty stringclasses 3
values | c_source stringclasses 441
values | architecture stringclasses 4
values | optimization stringclasses 4
values | compiler stringclasses 8
values | assembly stringlengths 31 174k |
|---|---|---|---|---|---|---|---|---|
300 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | mips64 | -O0 | mips64 gcc 15.2.0 | match_recursive:
daddiu $sp,$sp,-64
sd $31,56($sp)
sd $fp,48($sp)
sd $28,40($sp)
move $fp,$sp
lui $28,%hi(%neg(%gp_rel(match_recursive)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(match_recursive)))
sd $4,0($f... |
301 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | mips64 | -O1 | mips64 gcc 15.2.0 | match_recursive:
daddiu $sp,$sp,-64
sd $31,56($sp)
sd $28,48($sp)
sd $20,40($sp)
sd $19,32($sp)
sd $18,24($sp)
sd $17,16($sp)
sd $16,8($sp)
lui $28,%hi(%neg(%gp_rel(match_recursive)))
daddu $28,$28,... |
302 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | mips64 | -O2 | mips64 gcc 15.2.0 | match_recursive:
daddiu $sp,$sp,-64
sd $28,48($sp)
sd $16,0($sp)
sd $31,56($sp)
sd $21,40($sp)
sd $20,32($sp)
sd $19,24($sp)
sd $18,16($sp)
sd $17,8($sp)
lb $2,0($5)
lui $28,%hi(%neg... |
303 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | mips64 | -O3 | mips64 gcc 15.2.0 | match_recursive:
daddiu $sp,$sp,-64
sd $28,48($sp)
sd $16,0($sp)
sd $31,56($sp)
sd $21,40($sp)
sd $20,32($sp)
sd $19,24($sp)
sd $18,16($sp)
sd $17,8($sp)
lb $2,0($5)
lui $28,%hi(%neg... |
304 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | match_recursive:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
addi s0, sp, 48
sd a0, -32(s0)
sd a1, -40(s0)
sd a2, -48(s0)
ld a0, -40(s0)
lbu a0, 0(a0)
bnez a0, .LBB0_2
j .LBB0_1
.LBB... |
305 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | match_recursive:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
sd s1, 24(sp)
sd s2, 16(sp)
sd s3, 8(sp)
mv s2, a2
mv s1, a0
addi s0, a1, 2
li a0, 42
li a1, 46
j .LBB0_3... |
306 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | match_recursive:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
sd s1, 24(sp)
sd s2, 16(sp)
sd s3, 8(sp)
mv s2, a2
lbu a2, 0(a1)
mv s1, a0
beqz a2, .LBB0_8
addi s0, a1, 2
li ... |
307 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | match_recursive:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
sd s1, 24(sp)
sd s2, 16(sp)
sd s3, 8(sp)
mv s2, a2
lbu a2, 0(a1)
mv s1, a0
beqz a2, .LBB0_8
addi s0, a1, 2
li ... |
308 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | match_recursive:
addi sp,sp,-48
sd ra,40(sp)
sd s0,32(sp)
addi s0,sp,48
sd a0,-24(s0)
sd a1,-32(s0)
sd a2,-40(s0)
ld a5,-32(s0)
lbu a5,0(a5)
bne a5,zero,.L2
ld a5,-24(s0)
lbu ... |
309 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | match_recursive:
addi sp,sp,-48
sd ra,40(sp)
sd s0,32(sp)
mv s0,a0
lbu a5,0(a1)
beq a5,zero,.L18
sd s1,24(sp)
sd s2,16(sp)
mv s1,a1
mv s2,a2
lbu a3,1(a1)
li a4,42
... |
310 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | match_recursive:
lbu a5,0(a1)
mv a4,a0
mv a3,a1
li a6,42
li a7,46
bne a5,zero,.L2
j .L14
.L12:
bne a0,a1,.L27
.L13:
addi a4,a4,1
addi a3,a3,1
beq a5,zero,.L14
.L2:
mv a1,a... |
311 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | match_recursive:
lbu a5,0(a1)
mv a4,a0
mv a3,a1
li a6,42
li a7,46
bne a5,zero,.L2
j .L14
.L12:
bne a0,a1,.L27
.L13:
addi a4,a4,1
addi a3,a3,1
beq a5,zero,.L14
.L2:
mv a1,a... |
312 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O0 | x86-64 clang 21.1.0 | match_recursive:
push rbp
mov rbp, rsp
sub rsp, 32
mov qword ptr [rbp - 16], rdi
mov qword ptr [rbp - 24], rsi
mov qword ptr [rbp - 32], rdx
mov rax, qword ptr [rbp - 24]
movsx eax, byte ptr [rax]
cmp eax, 0
... |
313 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O1 | x86-64 clang 21.1.0 | match_recursive:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
add r15, 2
jmp .LBB0_1
.LBB0_12:
test cl, cl
je .LBB0_15
.LBB0_13:
inc r14
inc r15
.LBB0_1:
... |
314 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O2 | x86-64 clang 21.1.0 | match_recursive:
push r15
push r14
push rbx
mov rbx, rdi
movzx eax, byte ptr [rsi]
test al, al
je .LBB0_14
mov r14, rdx
mov r15, rsi
add r15, 2
jmp .LBB0_4
.LBB0_2:
cmp dl, al
... |
315 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O3 | x86-64 clang 21.1.0 | match_recursive:
push r15
push r14
push rbx
mov rbx, rdi
movzx eax, byte ptr [rsi]
test al, al
je .LBB0_15
mov r14, rdx
mov r15, rsi
add r15, 2
jmp .LBB0_4
.LBB0_2:
cmp dl, al
... |
316 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O0 | x86-64 gcc 15.2 | match_recursive:
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rax, QWORD PTR [rbp-16]
movzx eax, BYTE PTR [rax]
test al, al
jne ... |
317 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O1 | x86-64 gcc 15.2 | match_recursive:
push r14
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r12, rdx
movzx edx, BYTE PTR [rsi]
test dl, dl
je .L15
mov rbp, rsi
cmp BYTE PTR [rsi+1], 42
... |
318 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O2 | x86-64 gcc 15.2 | match_recursive:
push r14
push r12
mov r12, rdx
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
movzx eax, BYTE PTR [rsi]
test al, al
jne .L2
jmp .L14
.L12:
cmp cl,... |
319 | 10 | Regular Expression Matching | Hard | /*
10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, c... | x86-64 | -O3 | x86-64 gcc 15.2 | match_recursive:
push r14
push r12
mov r12, rdx
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
movzx eax, BYTE PTR [rsi]
test al, al
jne .L2
jmp .L14
.L12:
cmp cl,... |
320 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O0 | ARM64 gcc 15.2.0 | maxArea:
sub sp, sp, #48
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 44]
str wzr, [sp, 40]
ldr w0, [sp, 4]
sub w0, w0, #1
str w0, [sp, 36]
b .L2
.L5:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
... |
321 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O1 | ARM64 gcc 15.2.0 | maxArea:
mov x6, x0
sub w1, w1, #1
cmp w1, 0
ble .L6
mov w3, 0
mov w0, 0
b .L5
.L3:
sub w1, w1, #1
.L4:
cmp w1, w3
ble .L1
.L5:
ldr w5, [x6, w3, sxtw 2]
ldr w4, [x6, w1, sxtw... |
322 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O2 | ARM64 gcc 15.2.0 | maxArea:
sub w1, w1, #1
mov x6, x0
cmp w1, 0
ble .L6
mov w3, 0
mov w0, 0
b .L5
.L9:
add w3, w3, 1
cmp w3, w1
bge .L1
.L5:
ldr w4, [x6, w3, uxtw 2]
sub w2, w1, w3
ldr ... |
323 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O3 | ARM64 gcc 15.2.0 | maxArea:
sub w1, w1, #1
mov x6, x0
cmp w1, 0
ble .L6
mov w3, 0
mov w0, 0
b .L5
.L9:
add w3, w3, 1
cmp w1, w3
ble .L1
.L5:
ldr w4, [x6, w3, uxtw 2]
sub w2, w1, w3
ldr ... |
324 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O0 | armv8-a clang 21.1.0 | maxArea:
sub sp, sp, #48
str x0, [sp, #40]
str w1, [sp, #36]
str wzr, [sp, #16]
str wzr, [sp, #12]
ldr w8, [sp, #36]
subs w8, w8, #1
str w8, [sp, #8]
b .LBB0_1
.LBB0_1:
ldr w8, [sp, #12]
ldr ... |
325 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O1 | armv8-a clang 21.1.0 | maxArea:
cmp w1, #2
b.lt .LBB0_4
mov w9, wzr
mov w8, wzr
sub w10, w1, #1
.LBB0_2:
ldr w11, [x0, w9, uxtw #2]
ldr w12, [x0, w10, sxtw #2]
sub w13, w10, w9
cmp w11, w12
csel w11, w11, w12, lt
cset... |
326 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O2 | armv8-a clang 21.1.0 | maxArea:
cmp w1, #2
b.lt .LBB0_4
mov w9, wzr
mov w8, wzr
sub w10, w1, #1
.LBB0_2:
ldr w11, [x0, w9, uxtw #2]
ldr w12, [x0, w10, sxtw #2]
sub w13, w10, w9
cmp w11, w12
csel w11, w11, w12, lt
cset... |
327 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | aarch64 | -O3 | armv8-a clang 21.1.0 | maxArea:
cmp w1, #2
b.lt .LBB0_4
mov w9, wzr
mov w8, wzr
sub w10, w1, #1
.LBB0_2:
ldr w11, [x0, w9, uxtw #2]
ldr w12, [x0, w10, sxtw #2]
sub w14, w10, w9
cmp w11, w12
csel w13, w11, w12, lt
mul ... |
328 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O0 | mips64 clang 21.1.0 | maxArea:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -64
sd $ra, 56($sp)
sd $fp, 48($sp)
move $fp, $sp
move $1, $5
sd $4, 40($fp)
sw $1, 36($fp)
sw $zero, 16($fp)
sw $zero, 12($fp)
lw $1, 36($fp)
... |
329 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O1 | mips64 clang 21.1.0 | maxArea:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
slti $1, $5, 2
bnez $1, .LBB0_3
addiu $6, $zero, 0
addiu $2, $5, -1
addiu $3, $zero, 0
addiu $5, $zero, 0
.LBB0_2:
... |
330 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O2 | mips64 clang 21.1.0 | maxArea:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
slti $1, $5, 2
bnez $1, .LBB0_3
addiu $6, $zero, 0
addiu $2, $5, -1
addiu $3, $zero, 0
addiu $5, $zero, 0
.LBB0_2:
... |
331 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O3 | mips64 clang 21.1.0 | maxArea:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
slti $1, $5, 2
bnez $1, .LBB0_3
addiu $6, $zero, 0
addiu $2, $5, -1
addiu $3, $zero, 0
addiu $5, $zero, 0
.LBB0_2:
... |
332 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O0 | mips64 gcc 15.2.0 | maxArea:
daddiu $sp,$sp,-64
sd $fp,56($sp)
move $fp,$sp
sd $4,32($fp)
move $2,$5
sll $2,$2,0
sw $2,40($fp)
sw $0,0($fp)
sw $0,4($fp)
lw $2,40($fp)
addiu $2,$2,-1
sw $2,8($fp)
... |
333 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O1 | mips64 gcc 15.2.0 | maxArea:
addiu $5,$5,-1
blez $5,.L8
move $7,$0
b .L7
move $2,$0
.L5:
addiu $5,$5,-1
.L6:
slt $3,$7,$5
beq $3,$0,.L12
nop
.L7:
dsll $3,$7,2
daddu $3,$4,$3
lw $3,0($3)
dsll $6... |
334 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O2 | mips64 gcc 15.2.0 | maxArea:
addiu $5,$5,-1
blez $5,.L8
move $7,$0
b .L7
move $2,$0
.L13:
addiu $7,$7,1
slt $3,$7,$5
beq $3,$0,.L15
nop
.L7:
dsll $6,$7,32
.L14:
dsll $3,$5,32
dsrl $6,$6,32
dsrl ... |
335 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | mips64 | -O3 | mips64 gcc 15.2.0 | maxArea:
addiu $5,$5,-1
blez $5,.L8
move $7,$0
b .L7
move $2,$0
.L13:
addiu $7,$7,1
slt $3,$7,$5
beq $3,$0,.L15
nop
.L7:
dsll $6,$7,32
.L14:
dsll $3,$5,32
dsrl $6,$6,32
dsrl ... |
336 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | maxArea:
addi sp, sp, -64
sd ra, 56(sp)
sd s0, 48(sp)
addi s0, sp, 64
sd a0, -24(s0)
sw a1, -28(s0)
li a0, 0
sw a0, -48(s0)
sw a0, -52(s0)
lw a0, -28(s0)
addiw a0, a0, -1
sw ... |
337 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | maxArea:
li a2, 2
blt a1, a2, .LBB0_7
li a3, 0
li a6, 0
addiw a4, a1, -1
j .LBB0_3
.LBB0_2:
slt a1, a2, a5
xori a2, a1, 1
addw a3, a3, a1
subw a4, a4, a2
bge a3, a4, .LBB0_8
.LBB0_3:
... |
338 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | maxArea:
li a2, 2
blt a1, a2, .LBB0_7
li a3, 0
li a6, 0
addiw a4, a1, -1
j .LBB0_3
.LBB0_2:
slt a1, a2, a5
xori a2, a1, 1
addw a3, a3, a1
subw a4, a4, a2
bge a3, a4, .LBB0_8
.LBB0_3:
... |
339 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | maxArea:
li a2, 2
blt a1, a2, .LBB0_7
li a3, 0
li a6, 0
addiw a4, a1, -1
j .LBB0_3
.LBB0_2:
slt a1, a2, a5
xori a2, a1, 1
addw a3, a3, a1
subw a4, a4, a2
bge a3, a4, .LBB0_8
.LBB0_3:
... |
340 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | maxArea:
addi sp,sp,-64
sd ra,56(sp)
sd s0,48(sp)
addi s0,sp,64
sd a0,-56(s0)
mv a5,a1
sw a5,-60(s0)
sw zero,-20(s0)
sw zero,-24(s0)
lw a5,-60(s0)
addiw a5,a5,-1
sw a5,-28... |
341 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | maxArea:
mv a7,a0
addiw a1,a1,-1
ble a1,zero,.L8
li a4,0
li a0,0
j .L7
.L5:
addiw a1,a1,-1
.L6:
ble a1,a4,.L10
.L7:
slli a5,a4,2
add a5,a7,a5
lw a3,0(a5)
slli a5,a1,2
a... |
342 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | maxArea:
addiw a1,a1,-1
mv a7,a0
ble a1,zero,.L8
li a3,0
li a0,0
.L7:
slli a4,a1,2
slli a5,a3,2
add a5,a7,a5
add a4,a7,a4
lw a4,0(a4)
lw a2,0(a5)
subw a6,a1,a3
mv ... |
343 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | maxArea:
addiw a1,a1,-1
mv a7,a0
ble a1,zero,.L8
li a3,0
li a0,0
.L7:
slli a4,a1,2
slli a5,a3,2
add a5,a7,a5
add a4,a7,a4
lw a4,0(a4)
lw a2,0(a5)
subw a6,a1,a3
mv ... |
344 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O0 | x86-64 clang 21.1.0 | maxArea:
push rbp
mov rbp, rsp
mov qword ptr [rbp - 8], rdi
mov dword ptr [rbp - 12], esi
mov dword ptr [rbp - 32], 0
mov dword ptr [rbp - 36], 0
mov eax, dword ptr [rbp - 12]
sub eax, 1
mov dword ptr [rbp - 40], ... |
345 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O1 | x86-64 clang 21.1.0 | maxArea:
xor eax, eax
cmp esi, 2
jl .LBB0_3
dec esi
xor ecx, ecx
xor eax, eax
.LBB0_2:
mov edx, ecx
mov edx, dword ptr [rdi + 4*rdx]
movsxd rsi, esi
mov r8d, dword ptr [rdi + 4*rsi]
xor r9d,... |
346 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O2 | x86-64 clang 21.1.0 | maxArea:
xor eax, eax
cmp esi, 2
jl .LBB0_3
dec esi
xor ecx, ecx
xor eax, eax
.LBB0_2:
mov edx, ecx
mov edx, dword ptr [rdi + 4*rdx]
movsxd rsi, esi
mov r8d, dword ptr [rdi + 4*rsi]
xor r9d,... |
347 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O3 | x86-64 clang 21.1.0 | maxArea:
xor eax, eax
cmp esi, 2
jl .LBB0_3
dec esi
xor ecx, ecx
xor eax, eax
.LBB0_2:
mov edx, ecx
mov edx, dword ptr [rdi + 4*rdx]
movsxd rsi, esi
mov r8d, dword ptr [rdi + 4*rsi]
xor r9d,... |
348 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O0 | x86-64 gcc 15.2 | maxArea:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-40], rdi
mov DWORD PTR [rbp-44], esi
mov DWORD PTR [rbp-4], 0
mov DWORD PTR [rbp-8], 0
mov eax, DWORD PTR [rbp-44]
sub eax, 1
mov DWORD PTR [rbp-12], eax
j... |
349 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O1 | x86-64 gcc 15.2 | maxArea:
sub esi, 1
test esi, esi
jle .L6
mov edx, 0
mov r9d, 0
jmp .L5
.L3:
sub esi, 1
.L4:
cmp esi, edx
jle .L1
.L5:
movsx rax, edx
mov r8d, DWORD PTR [rdi+rax*4]
movsx rax, esi
... |
350 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O2 | x86-64 gcc 15.2 | maxArea:
sub esi, 1
mov r9, rdi
test esi, esi
jle .L6
xor edx, edx
xor r8d, r8d
jmp .L5
.L9:
add edx, 1
cmp edx, esi
jge .L1
.L5:
movsx rax, edx
mov ecx, DWORD PTR [r9+rax*4]
... |
351 | 11 | Container With Most Water | Medium | /*
11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains ... | x86-64 | -O3 | x86-64 gcc 15.2 | maxArea:
sub esi, 1
mov r9, rdi
test esi, esi
jle .L6
xor edx, edx
xor r8d, r8d
jmp .L5
.L9:
add edx, 1
cmp esi, edx
jle .L1
.L5:
movsx rax, edx
mov ecx, DWORD PTR [r9+rax*4]
... |
352 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O0 | ARM64 gcc 15.2.0 | .LC0:
.string "I"
.LC1:
.string "IV"
.LC2:
.string "V"
.LC3:
.string "IX"
.LC4:
.string "X"
.LC5:
.string "XL"
.LC6:
.string "L"
.LC7:
.string "XC"
.LC8:
.string "C"
.LC9:
.string "CD"
.LC10:
.string "D"
.LC11:
.string "CM"
... |
353 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O1 | ARM64 gcc 15.2.0 | intToRoman:
stp x29, x30, [sp, -64]!
mov x29, sp
stp x21, x22, [sp, 32]
mov w22, w0
mov x0, 1024
bl malloc
mov x21, x0
strb wzr, [x0]
cbz w22, .L1
stp x19, x20, [sp, 16]
stp x23, x24, [sp,... |
354 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O2 | ARM64 gcc 15.2.0 | intToRoman:
stp x29, x30, [sp, -64]!
mov x29, sp
stp x21, x22, [sp, 32]
mov w21, w0
mov x0, 1024
bl malloc
strb wzr, [x0]
mov x2, x0
cbz w21, .L1
adrp x22, .LANCHOR0
add x22, x22, :lo12:.LA... |
355 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O3 | ARM64 gcc 15.2.0 | intToRoman:
stp x29, x30, [sp, -64]!
mov x29, sp
stp x21, x22, [sp, 32]
mov w21, w0
mov x0, 1024
bl malloc
strb wzr, [x0]
mov x2, x0
cbz w21, .L1
adrp x22, .LANCHOR0
add x22, x22, :lo12:.LA... |
356 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O0 | armv8-a clang 21.1.0 | intToRoman:
sub sp, sp, #48
stp x29, x30, [sp, #32]
add x29, sp, #32
stur w0, [x29, #-4]
mov w8, #12
stur w8, [x29, #-12]
mov x0, #1024
bl malloc
str x0, [sp, #8]
ldr x8, [sp, #8]
strb wzr, ... |
357 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O1 | armv8-a clang 21.1.0 | intToRoman:
stp x29, x30, [sp, #-80]!
str x25, [sp, #16]
stp x24, x23, [sp, #32]
stp x22, x21, [sp, #48]
stp x20, x19, [sp, #64]
mov x29, sp
mov w19, w0
mov w0, #1024
bl malloc
strb wzr, [x0]
... |
358 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O2 | armv8-a clang 21.1.0 | intToRoman:
stp x29, x30, [sp, #-80]!
str x25, [sp, #16]
stp x24, x23, [sp, #32]
stp x22, x21, [sp, #48]
stp x20, x19, [sp, #64]
mov x29, sp
mov w19, w0
mov w0, #1024
bl malloc
strb wzr, [x0]
... |
359 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O3 | armv8-a clang 21.1.0 | intToRoman:
stp x29, x30, [sp, #-80]!
str x25, [sp, #16]
stp x24, x23, [sp, #32]
stp x22, x21, [sp, #48]
stp x20, x19, [sp, #64]
mov x29, sp
mov w19, w0
mov w0, #1024
bl malloc
strb wzr, [x0]
... |
360 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O0 | mips64 clang 21.1.0 | intToRoman:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -64
sd $ra, 56($sp)
sd $fp, 48($sp)
sd $gp, 40($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(intToRoman)))
daddu $1, $1, $25
daddiu $gp, $1, %lo(%neg(%gp_rel(intToRoman)))
... |
361 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O1 | mips64 clang 21.1.0 | intToRoman:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -80
sd $ra, 72($sp)
sd $fp, 64($sp)
sd $gp, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18, 24($sp)
sd $17, 16($sp)
sd $16, 8(... |
362 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O2 | mips64 clang 21.1.0 | intToRoman:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -80
sd $ra, 72($sp)
sd $fp, 64($sp)
sd $gp, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18, 24($sp)
sd $17, 16($sp)
sd $16, 8(... |
363 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O3 | mips64 clang 21.1.0 | intToRoman:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -80
sd $ra, 72($sp)
sd $fp, 64($sp)
sd $gp, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18, 24($sp)
sd $17, 16($sp)
sd $16, 8(... |
364 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O0 | mips64 gcc 15.2.0 | .LC0:
.ascii "I\000"
.LC1:
.ascii "IV\000"
.LC2:
.ascii "V\000"
.LC3:
.ascii "IX\000"
.LC4:
.ascii "X\000"
.LC5:
.ascii "XL\000"
.LC6:
.ascii "L\000"
.LC7:
.ascii "XC\000"
.LC8:
.ascii "C\000"
.LC9:
.ascii "CD\000"
.LC10:
... |
365 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O1 | mips64 gcc 15.2.0 | intToRoman:
daddiu $sp,$sp,-64
sd $31,56($sp)
sd $28,48($sp)
sd $21,40($sp)
sd $20,32($sp)
sd $19,24($sp)
sd $18,16($sp)
sd $17,8($sp)
sd $16,0($sp)
lui $28,%hi(%neg(%gp_rel(intToRoman)))
... |
366 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O2 | mips64 gcc 15.2.0 | intToRoman:
daddiu $sp,$sp,-48
sd $28,32($sp)
lui $28,%hi(%neg(%gp_rel(intToRoman)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(intToRoman)))
ld $25,%call16(malloc)($28)
sd $16,0($sp)
sd $31,40($sp)
sd $19,24... |
367 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O3 | mips64 gcc 15.2.0 | intToRoman:
daddiu $sp,$sp,-48
sd $28,32($sp)
lui $28,%hi(%neg(%gp_rel(intToRoman)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(intToRoman)))
ld $25,%call16(malloc)($28)
sd $16,0($sp)
sd $31,40($sp)
sd $19,24... |
368 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | intToRoman:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
addi s0, sp, 48
sw a0, -20(s0)
li a0, 12
sw a0, -28(s0)
li a0, 1024
call malloc
sd a0, -40(s0)
ld a1, -40(s0)
li ... |
369 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | intToRoman:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
mv s2, a0
li ... |
370 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | intToRoman:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
mv s2, a0
li ... |
371 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | intToRoman:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
mv s2, a0
li ... |
372 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | .LC0:
.string "I"
.LC1:
.string "IV"
.LC2:
.string "V"
.LC3:
.string "IX"
.LC4:
.string "X"
.LC5:
.string "XL"
.LC6:
.string "L"
.LC7:
.string "XC"
.LC8:
.string "C"
.LC9:
.string "CD"
.LC10:
.string "D"
.LC11:
.string "CM"
... |
373 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | intToRoman:
addi sp,sp,-64
sd ra,56(sp)
sd s2,32(sp)
sd s3,24(sp)
mv s3,a0
li a0,1024
call malloc
mv s2,a0
sb zero,0(a0)
beq s3,zero,.L1
sd s0,48(sp)
sd s1,40(sp)
... |
374 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | intToRoman:
addi sp,sp,-48
sd s2,16(sp)
mv s2,a0
li a0,1024
sd ra,40(sp)
call malloc
sb zero,0(a0)
mv a5,a0
beq s2,zero,.L1
sd s3,8(sp)
lui s3,%hi(.LANCHOR0+192)
sd s0,32... |
375 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | intToRoman:
addi sp,sp,-48
sd s2,16(sp)
mv s2,a0
li a0,1024
sd ra,40(sp)
call malloc
sb zero,0(a0)
mv a5,a0
beq s2,zero,.L1
sd s3,8(sp)
lui s3,%hi(.LANCHOR0+192)
sd s0,32... |
376 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O0 | x86-64 clang 21.1.0 | intToRoman:
push rbp
mov rbp, rsp
sub rsp, 32
mov dword ptr [rbp - 4], edi
mov dword ptr [rbp - 12], 12
mov edi, 1024
call malloc@PLT
mov qword ptr [rbp - 24], rax
mov rax, qword ptr [rbp - 24]
mov byte... |
377 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O1 | x86-64 clang 21.1.0 | intToRoman:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edi
mov edi, 1024
call malloc@PLT
mov rbx, rax
mov byte ptr [rax], 0
test ebp, ebp
... |
378 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O2 | x86-64 clang 21.1.0 | intToRoman:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edi
mov edi, 1024
call malloc@PLT
mov rbx, rax
mov byte ptr [rax], 0
test ebp, ebp
... |
379 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O3 | x86-64 clang 21.1.0 | intToRoman:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edi
mov edi, 1024
call malloc@PLT
mov rbx, rax
mov byte ptr [rax], 0
test ebp, ebp
... |
380 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O0 | x86-64 gcc 15.2 | .LC0:
.string "I"
.LC1:
.string "IV"
.LC2:
.string "V"
.LC3:
.string "IX"
.LC4:
.string "X"
.LC5:
.string "XL"
.LC6:
.string "L"
.LC7:
.string "XC"
.LC8:
.string "C"
.LC9:
.string "CD"
.LC10:
.string "D"
.LC11:
.string "CM"
... |
381 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O1 | x86-64 gcc 15.2 | intToRoman:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r13d, edi
mov edi, 1024
call malloc
mov r12, rax
mov BYTE PTR [rax], 0
test r13d, r13d
... |
382 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O2 | x86-64 gcc 15.2 | intToRoman:
push r13
push r12
push rbp
push rbx
mov ebx, edi
mov edi, 1024
sub rsp, 8
call malloc
mov BYTE PTR [rax], 0
mov rcx, rax
test ebx, ebx
je .L1
mov r13d, OFFSE... |
383 | 12 | Integer to Roman | Medium | /*
12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | x86-64 | -O3 | x86-64 gcc 15.2 | intToRoman:
push r13
push r12
push rbp
push rbx
mov ebx, edi
mov edi, 1024
sub rsp, 8
call malloc
mov BYTE PTR [rax], 0
mov rcx, rax
test ebx, ebx
je .L1
mov r13d, OFFSE... |
384 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O0 | ARM64 gcc 15.2.0 | romanToInt:
sub sp, sp, #32
str x0, [sp, 8]
str wzr, [sp, 28]
b .L2
.L20:
ldrb w0, [sp, 27]
cmp w0, 88
beq .L3
cmp w0, 88
bgt .L22
cmp w0, 86
beq .L5
cmp w0, 86
bgt ... |
385 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O1 | ARM64 gcc 15.2.0 | romanToInt:
mov x3, x0
ldrb w1, [x0]
cbz w1, .L19
add x2, x0, 1
mov w0, 0
b .L18
.L23:
mov x3, x2
b .L8
.L4:
cmp w1, 86
beq .L9
cmp w1, 88
beq .L10
mov x3, x2
... |
386 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O2 | ARM64 gcc 15.2.0 | romanToInt:
ldrb w1, [x0]
mov x3, x0
cbz w1, .L19
add x2, x0, 1
mov w0, 0
.L18:
cmp w1, 76
beq .L3
.L26:
bhi .L4
cmp w1, 68
beq .L5
cmp w1, 73
beq .L6
cmp w1, 67
... |
387 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O3 | ARM64 gcc 15.2.0 | romanToInt:
ldrb w1, [x0]
mov x3, x0
mov w0, 0
cbz w1, .L1
add x2, x3, 1
.L18:
cmp w1, 76
beq .L3
.L26:
bhi .L4
cmp w1, 68
beq .L5
cmp w1, 73
beq .L6
cmp w1, 67
... |
388 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O0 | armv8-a clang 21.1.0 | romanToInt:
sub sp, sp, #32
str x0, [sp, #24]
str wzr, [sp, #20]
b .LBB0_1
.LBB0_1:
ldr x8, [sp, #24]
add x9, x8, #1
str x9, [sp, #24]
ldrb w8, [x8]
strb w8, [sp, #19]
cbz w8, .LBB0_36
b ... |
389 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O1 | armv8-a clang 21.1.0 | romanToInt:
mov x8, x0
mov w0, wzr
b .LBB0_2
.LBB0_1:
add w0, w0, #500
.LBB0_2:
mov x9, x8
ldrb w10, [x8], #1
cmp w10, #75
b.le .LBB0_7
cmp w10, #85
b.gt .LBB0_13
cmp w10, #76
b.eq ... |
390 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O2 | armv8-a clang 21.1.0 | romanToInt:
mov x8, x0
mov w0, wzr
b .LBB0_2
.LBB0_1:
add w0, w0, #500
.LBB0_2:
mov x9, x8
ldrb w10, [x8], #1
cmp w10, #75
b.le .LBB0_7
cmp w10, #85
b.gt .LBB0_13
cmp w10, #76
b.eq ... |
391 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | aarch64 | -O3 | armv8-a clang 21.1.0 | romanToInt:
mov x8, x0
mov w0, wzr
b .LBB0_2
.LBB0_1:
add w0, w0, #500
.LBB0_2:
mov x9, x8
ldrb w10, [x8], #1
cmp w10, #75
b.le .LBB0_7
cmp w10, #85
b.gt .LBB0_13
cmp w10, #76
b.eq ... |
392 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O0 | mips64 clang 21.1.0 | romanToInt:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -48
sd $ra, 40($sp)
sd $fp, 32($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(romanToInt)))
daddu $1, $1, $25
daddiu $1, $1, %lo(%neg(%gp_rel(romanToInt)))
sd $1, 8($fp)
sd ... |
393 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O1 | mips64 clang 21.1.0 | romanToInt:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(romanToInt)))
daddu $1, $1, $25
daddiu $2, $1, %lo(%neg(%gp_rel(romanToInt)))
addiu $3, $zero, 0
ld ... |
394 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O2 | mips64 clang 21.1.0 | romanToInt:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(romanToInt)))
daddu $1, $1, $25
daddiu $2, $1, %lo(%neg(%gp_rel(romanToInt)))
addiu $3, $zero, 0
ld ... |
395 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O3 | mips64 clang 21.1.0 | romanToInt:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(romanToInt)))
addiu $3, $zero, 0
addiu $6, $zero, 77
addiu $7, $zero, 68
addiu $8, $zero, 88
... |
396 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O0 | mips64 gcc 15.2.0 | romanToInt:
daddiu $sp,$sp,-48
sd $fp,40($sp)
move $fp,$sp
sd $4,16($fp)
sw $0,0($fp)
b .L2
nop
.L20:
lb $2,4($fp)
li $3,88 # 0x58
beq $2,$3,.L3
nop
slt $3,$2,89
... |
397 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O1 | mips64 gcc 15.2.0 | romanToInt:
lui $11,%hi(%neg(%gp_rel(romanToInt)))
daddu $11,$11,$25
lb $3,0($4)
beq $3,$0,.L19
daddiu $11,$11,%lo(%neg(%gp_rel(romanToInt)))
daddiu $5,$4,1
move $2,$0
ld $7,%got_page(.L5)($11)
daddiu $7,$7,%got_ofst(.L5)... |
398 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O2 | mips64 gcc 15.2.0 | romanToInt:
lb $3,0($4)
lui $11,%hi(%neg(%gp_rel(romanToInt)))
daddu $11,$11,$25
beq $3,$0,.L19
daddiu $11,$11,%lo(%neg(%gp_rel(romanToInt)))
ld $7,%got_page(.L5)($11)
daddiu $6,$4,1
move $2,$0
daddiu $7,$7,%got_ofst(.L5)... |
399 | 13 | Roman to Integer | Easy | /*
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's add... | mips64 | -O3 | mips64 gcc 15.2.0 | romanToInt:
lb $3,0($4)
lui $11,%hi(%neg(%gp_rel(romanToInt)))
daddu $11,$11,$25
beq $3,$0,.L19
daddiu $11,$11,%lo(%neg(%gp_rel(romanToInt)))
ld $7,%got_page(.L5)($11)
daddiu $6,$4,1
move $2,$0
daddiu $7,$7,%got_ofst(.L5)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.