screen-shot for 3x3.txt screen-shot for 4x4.txt

I am getting correct output for 4x4.txt but not for 3x3.txt. I can't understand what went wrong. I have downloaded both the file as I am not using appliance. Can anyone check weather my 3x3.txt file is same as his/hers?

Here is a link location for my 3x3.txt: https://www.dropbox.com/s/zaw9wp2qhobhelc/3x3.txt

If they are same can you suggest me some possible reasons.

  • Are you sure your won() function works correctly?
    – kzidane
    Aug 16, 2014 at 13:20
  • Shouldn't grids with an odd amount of numbers be swapped?
    – user103853
    Aug 16, 2014 at 18:21
  • I have the same problem. my code works on 4x4.txt. But I've downloaded code from here: d2o9nyf4hwsci4.cloudfront.net/2009/fall/psets/3/tests/3x3.txt when I run this code I get a lot of Illegal moves, in result on next stage: !enter image description here Could you please share yours 3x3.txt ? Or someone has simmilar problem and found solution?
    – Nemo
    Oct 22, 2014 at 15:19

1 Answer 1


I found the problem by manually entering each number in '3x3.txt'. The problem was that my 3x3 file was missing last four numbers. I have download the correct 3x3 file and now it works perfectly.

  • I have a problem with "~cs50/pset3/3x3.txt".
    – Jiang
    Sep 18, 2014 at 15:02
  • I have a problem with "~cs50/pset3/3x3.txt". When I execute the "./fifteen 3 < ~cs50/pset3/3x3.txt", the terminal prompts "bash: ~cs50/pset3/3x3.txt: No such file or directory". How can I get access to the directory "~cs50" and download the files in it? Thank you very much!
    – Jiang
    Sep 18, 2014 at 15:22
  • Download it from the link provided into the question and store it into current directory Sep 24, 2014 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .