摘要: (不知道为啥开个数组就 TLE 。QAQ)#include #include #include //const int maxn = 100005;////int a[maxn];int main(){ int n,k,ans,x; while(~sca... 阅读全文
posted @ 2018-12-11 11:30 Mercury_Lc 阅读(149) 评论(0) 推荐(0)
摘要: C:#include #include #include struct node{ char data[30]; struct node *lc; struct node *rc; int num;};char a[30];int n;stru... 阅读全文
posted @ 2018-12-11 11:13 Mercury_Lc 阅读(131) 评论(0) 推荐(0)
摘要: C++:#include using namespace std;int n;struct node{ char data[55]; int num; struct node *lc, *rc;};void creat(struct node *&r... 阅读全文
posted @ 2018-12-11 11:11 Mercury_Lc 阅读(264) 评论(0) 推荐(0)
摘要: #include #include #include int a[1000005];int fin(int x,int l,int r){ int m = (l + r) / 2; if(l > r) return -1; if(a[m] == x)... 阅读全文
posted @ 2018-12-11 11:10 Mercury_Lc 阅读(340) 评论(0) 推荐(0)
摘要: Hash表的平方探测思路:如果当前这个没存放数值,就放进去,如果当前这个地方Hash [ i ] 已经有数值了,就以平方的间隔左右寻找没有存放数的空白 Hash [ i ]。 #include using namespace std;const int inf = 0... 阅读全文
posted @ 2018-12-11 11:08 Mercury_Lc 阅读(142) 评论(0) 推荐(0)