ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1236. Decoding Task

Some Hints... to solve this problem
Posted by Nurtayev Elmurod 17 May 2009 08:35
input1 : 05 26 2C 52 69 14 3F 31 4C 2A 69 65 1A 26 4B
input2 : 61 07 28 41 3B 63 07 2C 52 22 21 69 72 0B 42 5E
answer : 41 43 4D 20 49 43 50 43 20 4E 45 45 52 43 27 32
(P.S : I put the spaces only for that is easy to read && understand)
Why is first 2 bytes in answer is 41...?
Cuz, 61h xor 20h = 41h (20h -> 32d = ' ' = Space);
How to find the second,third,...?
41h xor 05h = 44h
44h xor 07h = 43h(Second 2 bytes);
43h xor 26h = 65h
65h xor 28 = 4Dh (Third 2 bytes);
Last some tips:
if you use algos for convert from Dec to Hex be careful;
your algo should convert
1 : 0d to 00h (not to 0h);
2 : 5d to 05h (not to 5h);
GoodLuck!!! ;-)

Edited by author 17.05.2009 08:41
Re: Some Hints... to solve this problem
Posted by alexey saybel 11 Feb 2010 11:20
thnx!