| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:我想知道最快的方法是啥?In Reply To:Re:我想知道最快的方法是啥? Posted by:mogen at 2010-04-12 20:55:19 正如我所料,这代码根本 AC 不了!
> #include<iostream>
> #include "math.h"
> #include <vector>
> using namespace std;
> using std::vector;
>
> int main()
> {
> vector<double> v;
> double x;
> int n;
> const double r=0.577218;
> while(cin>>x)
> {
> if(x!=0.0)
> v.push_back(x);
> else
> break;
> }
> for(vector<double>::iterator it=v.begin();it!=v.end();it++)
> {
> double l=exp(*it+1-r)-1;
> n=(int)(l+0.5);
> cout<<n<<" card(s)"<<endl;
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator