P1: A3 - Running Numbers (Archived)

A little extra preparation when submitting your Problem 3 entry

We would like to request a little extra preparation of your entry to help the judges to more easily access your entry files.

We have had some issues with some of the previous files uploaded for the contest. To make things easier for the judges, we would like to request that when you submit your entry, please uploadyour code in a ZIP or TARfile andplease providea small readme.txtwith instructions onhow to compile and runyour code.

"Entry Submit" Link is now live for Apprentice Problem 3

We posted the ApprenticeProblem 3 "Entry Submit" link on the problem page yesterday. Participants can now upload their entries.

We have had some issues with some of the previous files uploaded for the contest. To make things easier for the judges, we would like to request that when you submit your entry, please upload their code in a ZIP or TARfile andplease providea small readme.txtwith instructions onhow to compile and runyour code.

problem understanding

As given in Demo Scenario
MyApp.exe 1BFC91544B9CBF9E5B93FFCAB7273070 38040301052B0163A103400502060501 05ED2F440000B17B0000000100000036
expected result is
4774 cycles

My understanding of problem

4774 means
DWord addition will be = 4774 / 37 = 129 times
ByteAddition = 4774 - 129 = 4645 times

Since 0x70 is least significant byte in DWord so after 4774 cycles it should be = (0x70 + 4645 * 0x01 + 129 * 0x36)%256 = 203

Please let me know the what I misunderstood from problem statement?

Has anyone tried 574395734 cycles?

I was fustrated that my code cannot work the 4774 cycles until I found out on this forum that adding cycle 0 makes it work. I agree with the rest of you that if cycle 0 is required then the walkthrough is very misleading.

But I don't feel good with one test case only, I want to verify the other test case as well. Has anyone tried the 574395734 cycles test case? I want to confirm that "cycle 0" is necessary before I proceed.

Repeat before Zero

My original intuition about the "repeat original values" aspect of this problem is that it served as a safety net in case the bytes never reach zero simultaneously. When the original values repeat, it starts over and the same sequence of numbers would be generated the second time around, once again missing zero.

Wrong! Here's a simple counter-example that one can hand simulate for better understanding:

./running 000000000000000000000000ffffff00 00000000000000000000000000000001 00000000000000000000000000000001

Misprint error fixed for P1:A3 Running Numbers - Problem 3 has been amended

AMisprint error was discovered in P1:A3 - Running Numbers, Apprentice Problem 3. A misprint error was found in the "Walkthrough" section of the problem. We have amended the problem and it now is correct.

This misprint error was discussed the following forum, please see details: http://software.intel.com/en-us/forums/showthread.php?t=83234

Thanks to John Bauer and other contestants for reporting this issue.

More Examples

Since the Example thread in the previous two stages always was a hit lets have one for this one.

Since i'm not entirely sure about my implementation i'll post a few easy to verify ones and we'll work our way from there to the more interesting stuff, as always huge disclamer : 'I validated these using the same code that solved the intel examples correctly, i cannot however rule out any mistakes, if you are getting different results its probably me screwing up not you'

The format is the same as the intel examples with one extra column

Subscribe to P1: A3 - Running Numbers (Archived)