128 - Software CRC

All about problems in Volume 1. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

anacharsis
Learning poster
Posts: 69
Joined: Mon Feb 09, 2015 1:56 am

Re: 128 - Software CRC

Post by anacharsis »

Has anyone gotten this one to work using Java?
It looks like the judge is running a lot of input through this one, and I am timing out.
I've tried a whole slew of different stream readers.
I'm thinking about trying NIO next...
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 128 - Software CRC

Post by brianfry713 »

Yes people have solved it using Java.
Try using BufferedReader and BufferedWriter.
Check input and AC output for thousands of problems on uDebug!
anacharsis
Learning poster
Posts: 69
Joined: Mon Feb 09, 2015 1:56 am

Re: 128 - Software CRC

Post by anacharsis »

Thanks for the response!
I had already actually tried that.

It turns out the bottle neck was not in reading the inputs.
It was in Java's printf() implementation.
I rolled my own hex formatter and just got accepted.

Learn something new everyday... :)
Post Reply

Return to “Volume 1 (100-199)”