PAT (Advanced Level) Practice 1078 Hashing

题目连接:1078 Hashingios 审题不难,思路也很简单。若M不为素数,先找出大于M的最小素数。因此,先打表素数。以后采用二次探测法进行哈希插入。输出在Hash表中id。若不能插入则输出 ‘-’。spa AC代码:code #include <iostream> #include <cstdio> using namespace std; const int maxn = 10020; i
相关文章
相关标签/搜索