Tourist is not tourist anymore haha
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | maspy | 150 |
| 3 | Um_nik | 145 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | nik_exists | 133 |
| 8 | DNR | 132 |
| 9 | AmShZ | 130 |
| 10 | Dominater069 | 129 |
Tourist is not tourist anymore haha
HELp!!!!!
I cann't find a BUG in my CODE.
.text
.global main
main: call readi32 movl %eax, %ebx // ebx = size movl %esp, %ecx // ecx = initial stack
read_seq: // read sequence and check it testl %ebx, %ebx jz finish_read decl %ebx
call readi32
cmpl $0, %eax
jl negative
pushl %eax
jmp read_seq
negative: cmpl %esp, %ecx je wrong_sequence popl %edx addl %eax, %edx jnz wrong_sequence jmp read_seq
wrong_sequence: xorl %eax, %eax call writei32 call finish
finish_read: cmpl %esp, %ecx jne wrong_sequence
movl $1, %eax
call writei32
call finish
And this must be compiled with simpleio lib:
/* -*- asm -*- */
.text
_form1: .asciz "%d" .text .align 16 .global readi32 readi32: pushl %ebp movl %esp, %ebp
subl $4, %esp
and $-16, %esp
leal -4(%ebp), %eax
push %ecx
push %edx
sub $8, %esp
mov %eax, 4(%esp)
movl $_form1, (%esp)call _scanf
call scanf
add $8, %esp
movl %eax, %ecx
movl -4(%ebp), %eax
clc
cmpl $1, %ecx
je readi32x
stcreadi32x:
pop %edx pop %ecx movl %ebp, %esp popl %ebp ret
.text
_form2: .asciz "%d\n" .text .align 16 .global writei32 writei32:
pushl %ebp movl %esp, %ebp and $-16, %esp push %ecx push %edx
sub $8, %esp
mov %eax, 4(%esp)
movl $_form2, (%esp)call _printf
call printf
add $4, %esp
push stdout
call fflush
add $4, %esp
pop %eax
pop %edx
pop %ecx
movl %ebp, %esp
popl %ebp
ret
.align 16
.global nlnl: pushl %ebp movl %esp, %ebp and $-16, %esp push %ecx push %edx
sub $8, %esp
movl $'\n', (%esp)call _putchar
call putchar
add $8, %esp
pop %edx
pop %ecx
movl %ebp, %esp
popl %ebp
ret
.text
.align 16
.global finishfinish: and $-16, %esp sub $16, %esp movl $0, (%esp)
call _exit
call exit
.text
_form3: .asciz "%lli" .align 16 .global readi64 readi64: pushl %ebp movl %esp, %ebp sub $8, %esp and $-16, %esp push %ecx
leal -8(%ebp), %eax
sub $12, %esp
mov %eax, 4(%esp)
movl $_form3, (%esp)call _scanf
call scanf
add $12, %esp
movl %eax, %ecx
movl -8(%ebp), %eax
movl -4(%ebp), %edx
clc
cmpl $1, %ecx
je readi64x
stcreadi64x:
pop %ecx movl %ebp, %esp popl %ebp ret
.text
_form4: .asciz "%lld\n" .align 16 .global writei64 writei64:
pushl %ebp movl %esp, %ebp and $-16, %esp push %ecx
sub $12, %esp
mov %edx, 8(%esp)
mov %eax, 4(%esp)
movl $_form4, (%esp)call _printf
call printf
add $4, %esp
push stdout
call fflush
add $4, %esp
pop %eax
pop %edx
pop %ecx
movl %ebp, %esp
popl %ebp
retHello Codeforces!
I'd like to present you short and spectacular tutorial of radix sort
Всем привет!
Я нашел очень хороший конспект на теорию расписаний на нирке, но не знаю где можно попрактиковаться. Если вы знаете какие-нибудь тренировки на эту тему или просто задачи с CF или других OJ, то пожалуйста поделитесь в комментариях.
Список задач:
FII Code 2020 Round #3 has just finished!
I propose to discuss tasks and there solutions here.
I am really interested how to solve problem E and would be very grateful if somebody will explain.
| Название |
|---|


