Submission #2240496

Source Code Expand

Copy
tmp = dlmread(stdin);
n = size(tmp,1) - 1;
tmp(1,1) = 0;
tmp = abs(diff(tmp));
val = tmp(:,1) - tmp(:,2) - tmp(:,3);

for i = 1:n
	if val(i) < 0 || mod(val(i),2)
		printf('No\n');
		exit;
	end
end

printf('Yes\n');

Submission Info

Submission Time
Task ABC086C - Traveling
User Hec
Language Octave (4.0.2)
Score 300
Code Size 229 Byte
Status
Exec Time 1790 ms
Memory 16524 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_000.txt, 0_001.txt, 0_002.txt
All 300 / 300 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt
Case Name Status Exec Time Memory
0_000.txt 140 ms 9536 KB
0_001.txt 141 ms 9420 KB
0_002.txt 140 ms 9420 KB
1_003.txt 141 ms 9420 KB
1_004.txt 1790 ms 16520 KB
1_005.txt 386 ms 16524 KB
1_006.txt 1774 ms 16520 KB
1_007.txt 386 ms 10508 KB
1_008.txt 143 ms 9540 KB
1_009.txt 188 ms 10892 KB
1_010.txt 139 ms 9416 KB
1_011.txt 170 ms 10444 KB
1_012.txt 140 ms 9420 KB