Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

很简单

Posted by foreverago at 2011-06-26 08:02:00 on Problem 2513
In Reply To:谁能说说hash函数是怎么找的啊? 我只会trie解法 Posted by:lijinwu at 2010-04-14 14:57:31
int hash(char s[12])
{
    int h=1;
    int n=strlen(s);
    for(int j=0;j<n;j++)
    {
        h+=h*29+(s[j]-'a');
        h%=N;
    }
    return h;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator