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:水过,贴AC代码

Posted by yy17yy at 2010-11-10 12:46:46 on Problem 3543
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:
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