Submission #2240220

Source Code Expand

Copy
s =scanf('%s', 'C');

s = fliplr(s);
n = size(s,2);


pos = 1;

while pos <= n

	if pos + 6 <= n && strcmp(s(pos:pos+6),'remaerd')
		pos = pos + 7;
		continue;
	end

	if pos + 5 <= n && strcmp(s(pos:pos+5),'resare')
		pos = pos + 6;
		continue;
	end

	if pos + 4 <= n && strcmp(s(pos:pos+4),'maerd')
		pos = pos + 5;
		continue;
	end

	if pos + 4 <= n && strcmp(s(pos:pos+4),'esare')
		pos = pos + 5;
		continue;
	end	

	printf('NO\n');
	exit;
end

printf('YES\n');

Submission Info

Submission Time
Task ABC049C - 白昼夢 / Daydream
User Hec
Language Octave (4.0.2)
Score 300
Code Size 501 Byte
Status
Exec Time 901 ms
Memory 11716 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
All 300 / 300 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt
Case Name Status Exec Time Memory
subtask0_0.txt 142 ms 9420 KB
subtask0_1.txt 141 ms 9416 KB
subtask0_2.txt 142 ms 9420 KB
subtask1_0.txt 714 ms 9664 KB
subtask1_1.txt 643 ms 9664 KB
subtask1_10.txt 901 ms 9664 KB
subtask1_11.txt 897 ms 9668 KB
subtask1_12.txt 900 ms 9788 KB
subtask1_13.txt 899 ms 9668 KB
subtask1_14.txt 465 ms 9668 KB
subtask1_15.txt 637 ms 9664 KB
subtask1_2.txt 285 ms 9664 KB
subtask1_3.txt 896 ms 9788 KB
subtask1_4.txt 845 ms 9664 KB
subtask1_5.txt 883 ms 11716 KB
subtask1_6.txt 838 ms 9664 KB
subtask1_7.txt 827 ms 9664 KB
subtask1_8.txt 884 ms 9664 KB
subtask1_9.txt 881 ms 9668 KB