[cpp] Re: Cpp Digest, Vol 24, Issue 26

李慧霸 magazine.lihuiba at 163.com
Tue Mar 28 16:57:03 CST 2006


好像是5个吧,你呢?

------------------				 
李慧霸
2006-03-28

-------------------------------------------------------------
发件人:xxmplus
发送日期:2006-03-26 20:51:40
收件人:
抄送:
主题:Re: Re: Re: [cpp] Re: Cpp Digest, Vol 24, Issue 26


挂了几个泡泡?:)

在 06-3-26,李慧霸<magazine.lihuiba at 163.com> 写道:
> 呵呵,果然参加过的。我02年也参加了,在北大的那一次,成绩也平平:)
>
> ------------------
> 李慧霸
> 2006-03-26
>
> -------------------------------------------------------------
> 发件人:Chen Shuo
> 发送日期:2006-03-23 21:26:40
> 收件人:
> 抄送:
> 主题:Re: Re: [cpp] Re: Cpp Digest, Vol 24, Issue 26
>
>
> 惭愧,大三的时候(2002年)参加过两次ACM选拔赛,铩羽而归。
>
> On 3/23/06, 李慧霸 <magazine.lihuiba at 163.com> wrote:
> > 这位兄台对算法如此谙熟,可曾参加过NOI、ACM?
> >
> > ------------------
> > 李慧霸
> > 2006-03-23
> >
> > -------------------------------------------------------------
> > 发件人:Chen Shuo
> > 发送日期:2006-03-23 12:02:06
> > 收件人:
> > 抄送:
> > 主题:Re: [cpp] Re: Cpp Digest, Vol 24, Issue 26
> >
> >
> > N^2 的算法
> >
> > int countAB(const string& AB)
> > {
> >    vector<int> current, next;
> >    // should we reserve these vectors?
> >    current.push_back(1);
> >
> >    for (size_t letter = 0; letter < AB.length(); ++letter) {
> >        next.resize(current.size()+1);
> >        next[0] = 0;
> >        if (AB[letter] == 'A') {
> >            partial_sum(current.begin(), current.end(), next.begin()+1);
> >        } else {
> >            assert(AB[letter] == 'B');
> >            partial_sum(current.rbegin(), current.rend(), next.begin()+1);
> >            reverse(next.begin(), next.end());
> >        }
> >        swap(current, next);
> >    }
> >    return accumulate(current.begin(), current.end(), 0);
> > }
> >
> > _______________________________________________
> > Cpp mailing list
> > Cpp at codingnow.com
> > http://codingnow.com/mailman/listinfo/cpp
> >
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>

_______________________________________________
Cpp mailing list
Cpp at codingnow.com
http://codingnow.com/mailman/listinfo/cpp




More information about the Cpp mailing list