There seems to be an issue with using files as storage in bash.
So in bash, I tried dumping out the block representing a number to a file name “0”, “1”, “2”,… and so on with the pattern in them. I used that set to compare the input to by just diffing the incoming with the set of patterns i had stored. This worked all well and dandy during the test cases.
However, on submit this failed. I thought it might be an issue where they were getting ran parallel and so the files were conflicting, so I used the process id of the script to make sure that wasn’t the case. This did not help.
As a final test, i just stored them internally into memory as one long string, and it worked fine. I didn’t have to change any base calculations being performed. So to me, it appears that this is a bug with using files. I’m mainly just curious what is failing on submit and why.
It could just be that codingame doesn’t like me writing a bunch of files, but it didn’t seem to be an issue during the test cases.