史无前例,牛客免费送题库会员了!

秋招即将到了

让牛客给大家加个金身!

限时免费赠送牛客大会员了!

会员权益有哪些?

  1. 独家真题
  2. 专项题库
  3. 视频题解
  4. 专属专栏

仅需3人组团,即可免费领取牛客大会员,数量有限,先到先得!

手机端可点击直接参与:https://www.nowcoder.com/link/campus_huiyuan2024

电脑端请扫码参与:

会员题库不仅题目丰富(400+精选题),并且每道题都配有视频讲解,包听包会!

免费送活动仅限这几天,赶快来薅这拨羊毛

点击直接参与:https://www.nowcoder.com/link/campus_huiyuan2024

全部评论

相关推荐

//TruncatedStepRowtemplate<size_t WIDTH> template<size_t W>TruncatedStepRow<WIDTH>::TruncatedStepRow(const TruncatedStepRow<W>& a, const TruncatedStepRow<W>& b, size_t len, size_t lenIndices, int lenTrim) :        StepRow<WIDTH> {a}{    cout<<"len="<<len<<endl;                            //30    cout<<"lenIndices="<<lenIndices<<endl;              //1 //   cout<<"lenTrim="<<lenTrim<<endl;                    //3    assert(len+lenIndices <= W);    assert(len-lenTrim+(2*lenIndices) <= WIDTH);//    unsigned char  hash[len-lenTrim];        cout<<"colision hash a =";    for(long long unsigned int i=0;i<len;i++){        cout<<a.hash[i];    }    cout<<endl;    cout<<"colision hash b =";    for(long long unsigned int i=0;i<len;i++){        cout<<b.hash[i];    }    cout<<endl;        for (int i = lenTrim; i < (int)len-lenTrim; i++){        hash[i-lenTrim] = a.hash[i] ^ a.hash[i];    } //    cout<<endl;    print_hash(len-lenTrim);    if (a.IndicesBefore(b, len, lenIndices)) {        std::copy(a.hash+len, a.hash+len+lenIndices, hash+len-lenTrim);        std::copy(b.hash+len, b.hash+len+lenIndices, hash+len-lenTrim+lenIndices);    } else {        std::copy(b.hash+len, b.hash+len+lenIndices, hash+len-lenTrim);        std::copy(a.hash+len, a.hash+len+lenIndices, hash+len-lenTrim+lenIndices);    }    //cout<<endl;    //cout<<endl;}相同的值异或应该是0才对,为什么输出还是4或者7 啊??
点赞 评论 收藏
分享
2 2 评论
分享
牛客网
牛客企业服务