CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:yhyy
Submission time:2017-10-06 16:21:06 +0300
Language:Assembly
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.05 sdetails
#2ACCEPTED0.05 sdetails
#3ACCEPTED0.05 sdetails
#4ACCEPTED0.04 sdetails
#5ACCEPTED0.05 sdetails
#6ACCEPTED0.04 sdetails
#7ACCEPTED0.05 sdetails
#8ACCEPTED0.05 sdetails
#9ACCEPTED0.05 sdetails
#10ACCEPTED0.05 sdetails

Code

section	.data
section	.bss
	buf resb 90090000	; tuloste
	
section	.text
	global _start
_start:
	mov	eax, 3
	mov	ebx, 0
	mov	ecx, buf
	mov	edx, 30000000
	int	0x80		; lue syöte
	
	mov	rsi, buf	
	mov	rdi, buf	
	xor	eax, eax
	xor	edx, edx
	
	lodsb
	stosb
._0:
	cmp	eax, 0
	je	.lopeta
	cmp	rsi, rdi
	jne	.__1
.__0:	
	mov	edx, eax
	lodsb
	cmp	edx, eax
	je	.__0
	stosb
	jmp	._0
	
.__1:	
	dec	rdi
	dec	rdi
	stosb
.__2:
	lodsb
	stosb
	cmp	eax, 0
	jne	.__2
	mov	rsi, buf
	mov	rdi, buf
	lodsb
	stosb
	jmp	._0


.lopeta:
	dec	rdi
	call	flush
	mov	rax, 1
	mov	rbx, 0
	int	0x80


;) ******************   flush   ********************* (;
; suoritetaan lopussa niin buf tulostuu
flush:	;! huom sotkee lähes KAIKEN
	mov	rdx, rdi
	sub	rdx, buf
	mov	rax, 4
	mov	rbx, 1
	mov	rcx, buf
	int	0x80
	ret
	

Test details

Test 1

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
ABABABABABABABABABABABABABABAB...

Test 2

Verdict: ACCEPTED

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Test 3

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Test 4

Verdict: ACCEPTED

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
BAB

Test 5

Verdict: ACCEPTED

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
ACDCACDADBADABACACDCADADABABCA...

Test 6

Verdict: ACCEPTED

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

Test 7

Verdict: ACCEPTED

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

Test 8

Verdict: ACCEPTED

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

Test 9

Verdict: ACCEPTED

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

Test 10

Verdict: ACCEPTED

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...