Guest User

Untitled

a guest
Aug 24th, 2010
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int hash(square x,int yk){
  2.     int sum;
  3.     int res=1;
  4.     for (int i=0;i<N;i++){
  5.         sum=0;
  6.         for (int j=0;j<N;j++){
  7.             if (x.box[i][j]!='0'){
  8.                 sum+=(j+1)*(x.box[i][j]-'0');
  9.             }
  10.         }
  11.         sum*=i+1;
  12.         res*=sum;
  13.     }
  14.     res+=yk;
  15.     return res;
  16. }
RAW Paste Data