Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:我想知道最快的方法是啥?

Posted by YeeBoo at 2011-04-10 01:01:16 on Problem 1003
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator