We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Yes, it's trick ... but not nice trick at least for C-implementation! Because ('0'|'1') - single machine instruction, but (int64 | int64) - single machine instruction too! I.e. your algoritm is 64 times slower then it's possible;D. When I studied C (20 years ago), I disassembled my program and rated how nice it looks in assembler - it was very helpful
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
Yes, it's trick ... but not nice trick at least for C-implementation! Because ('0'|'1') - single machine instruction, but (int64 | int64) - single machine instruction too! I.e. your algoritm is 64 times slower then it's possible;D. When I studied C (20 years ago), I disassembled my program and rated how nice it looks in assembler - it was very helpful