• 其他-手工哈希映射


    struct ghs {
    private:
    	static const int A = 999917, B = 1e7;
    	ll v[B];
    	int fst[A], nxt[B], w[B], s[B], top, cnt;
    	
    	int ins(int x, ll y)
    	{
    		if (!fst[x]) s[++top] = x;
    		nxt[++cnt] = fst[x], fst[x] = cnt;
    		v[cnt] = y;
    		return w[cnt] = 0;
    	}
    	
    	void clear()
    	{
    		cnt = 0;
    		while (top)
    			fst[s[top--]] = 0;
    		return;
    	}
    
    public:
    	int &operator [] (ll x)
    	const
    	{
    		int t = x % A;
    		for (int i = fst[t]; i; i = nxt[i])
    			if (v[i] == x) return w[x];
    		return ins(t, x);
    	}
    };
    

    Really don't like that Old–fashioned 'au' sound, and the tune is bit of weird i think (as if she's choking). And btw, officially no British dialects have the glotal T sound (like wa'er) except for Cockney, which is far away from modern RP and considered unstandard. You speak with modern RP to show your intelligence and how well you have been educated, of course. But i just can't stop associating this with an old weather forecaster...

  • 相关阅读:
    做接口测试最重要的知识点
    HTTP和HTTPS区别
    UVA, 686 Goldbach's Conjecture (II)
    UVA, 543 Goldbach's Conjecture
    UVA, 580 Critical Mass
    UVA, 900 Brick Wall Patterns
    UVA, 11000 Bee
    UVA, 10079 Pizza Cutting
    C++ 向量<vector>的学习
    jenkins入门
  • 原文地址:https://www.cnblogs.com/ghcred/p/9839786.html
Copyright © 2020-2023  润新知