• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            心如止水
            Je n'ai pas le temps
            posts - 400,comments - 130,trackbacks - 0
            Use a hash table to reflect two lists of numbers.
            It seems that each number cannot be less that -32768 and cannot be more that 32767.But I heard that it was not true."maxn" should be 100000,I suggest.Or you can try to find it...
            Here is my code:
            #include<iostream>
            #include
            <string.h>
            #define maxn 100000
            using namespace std;
            long n,m;
            bool a[2*maxn+7],b[2*maxn+7];
            long f(long x)
            {
                
            return x+maxn+1;
            }
            int main()
            {
                
            /*
                freopen("data.in","r",stdin);
                freopen("data.out","w",stdout);
                //
            */
                memset(a,
            false,sizeof(a));
                memset(b,
            false,sizeof(b));
                cin
            >>n;
                
            for(long i=1;i<=n;i++)
                {
                    
            long t;
                    cin
            >>t;
                    a[f(t)]
            =true;
                }
                cin
            >>m;
                
            for(long i=1;i<=n;i++)
                {
                    
            long t;
                    cin
            >>t;
                    b[f(t)]
            =true;
                }
                
            for(long i=-maxn;i<=maxn;i++)
                    
            if(a[f(i)]&&b[f(10000-i)])
                    {
                        cout
            <<"YES"<<endl;
                        
            return 0;
                    }
                cout
            <<"NO"<<endl;
            return 0;
            }


            posted on 2010-09-21 16:11 lee1r 閱讀(176) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:數據結構
            久久狠狠高潮亚洲精品| 久久久精品人妻无码专区不卡| 无码精品久久一区二区三区| 久久久久亚洲AV综合波多野结衣| 性做久久久久久久| 激情久久久久久久久久| 久久婷婷色综合一区二区| 久久午夜羞羞影院免费观看| 亚洲国产成人久久笫一页| 亚洲午夜精品久久久久久人妖| 久久精品国产欧美日韩99热| 久久精品国产亚洲麻豆| 久久免费看黄a级毛片| 99久久精品毛片免费播放| 久久精品蜜芽亚洲国产AV| 精品一久久香蕉国产线看播放| 亚洲色大成网站WWW久久九九| 久久夜色精品国产噜噜亚洲a| 久久国产乱子伦精品免费强| 久久国产欧美日韩精品| 久久综合视频网站| 国产精品青草久久久久福利99 | 尹人香蕉久久99天天拍| 久久超碰97人人做人人爱| 久久午夜免费视频| 人妻系列无码专区久久五月天| 久久免费视频网站| 免费观看久久精彩视频| 日韩人妻无码一区二区三区久久| 久久夜色精品国产亚洲av| 亚洲精品高清久久| 2021国产成人精品久久| 久久久久中文字幕| 久久99国产精品久久99果冻传媒| 99久久精品日本一区二区免费| 国产福利电影一区二区三区,免费久久久久久久精| 久久精品国产亚洲AV蜜臀色欲| 久久久久亚洲AV无码专区首JN| 三级片免费观看久久| 久久婷婷国产剧情内射白浆| 久久精品国产亚洲AV香蕉|