本文整理汇总了C++中vll::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ vll::push_back方法的具体用法?C++ vll::push_back怎么用?C++ vll::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vll
的用法示例。
在下文中一共展示了vll::push_back方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preprocess
void preprocess(){
nums.push_back(0);
ll sqr = 1, i = 1;
while(sqr <= max_n){
if(test(sqr) && sqr%i == 0) nums.push_back(sqr);
i++; sqr = i*i;
}
}
示例2: cal
ll cal() {
vec.push_back(0);
vec.push_back(1);
ll add = 2;
ll a = 2;
for (int i = 2; i < 1000001; ++i) {
vec.push_back(vec[i - 1] + a);
i++;
a += add;
vec.push_back(vec[i - 1] + a);
a += add;
add++;
}
}
示例3: main
int main ()
{
ll mid;
ll i,j,k,x,ans=0,depend,l,n,ind;
cin>>n>>m>>depend;
fr(i,n)
{
cin>>x;
man.push_back(x);
}
示例4: deal
int deal(){
weight.clear();
cin >> buf;
int depth = 0;
ll tmp;
for (string::iterator ii = buf.begin(); ii != buf.end(); ii++){
switch (*ii){
case '[':
{
depth++;
}break;
case ']':
{
depth--;
}break;
case ',':break;
default:
{
tmp = 0;
while ('0' <= *ii && *ii <= '9') tmp = tmp * 10 + *ii - '0', ii++;
ii--;
weight.push_back(tmp << depth);
}
}
}
sort(weight.begin(), weight.end());
int len = weight.size();
int best = 0, cur = 1;
weight.push_back(-1);
for (int i = 0; i < len; i++){
if (weight[i + 1] != weight[i]){
best = max(best, cur);
cur = 1;
}
else cur++;
}
return len - best;
}
示例5: init
void init()
{
int i=0 , j;
LL pnum=0 , p=1;
sll st;
sll::iterator it;
for(i=0; i<plen; i++)
{
pnum = prm[i];
for(j=2; j<=40; j++)
{
//pnum = power(prm[i] , j);
p=1;
for(int k=1; k<=j; k++)
{
p*=pnum;
if(p > mxhigh) break;
}
if(p < mxhigh)
{
st.insert(p);
}
}
}
//cerr << st.size();
for(it=st.begin() ; it!=st.end() ; ++it)
{
v.push_back(*it);
}
//for(i=0; i<100; i++) cout << v[i] << " ";
//cout << v.size();
//cout << v[v.size()-1];
vlen = v.size();
}