oofoof

线段树代码中 k<<1|1 的说明

【程序代码】

#include<bits/stdc++.h>

using namespace std;

int main() {

    int k;

    cin>>k;

    cout<<(k<<1|1);        //2k+1

    

return 0;

}


评论