| ||||||||||
| 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:水过,贴AC代码In Reply To:水过,贴AC代码 Posted by:caizixian at 2010-02-15 10:08:30 呃呃呃呃呃呃呃呃,水进6000,,,,
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int h,w;
cin>>h>>w;
int temp;
if(h==w)
temp=h+w;
else
temp=h>w?w*2+1:h*2+1;
int ans=(int)sqrt((double)temp);
if(ans)
cout<<ans<<endl;
else
cout<<"Impossible"<<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