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

真不明白,这代码水不过去竟然-。-!~~非要好好写吗。。。。。ORZ~~

Posted by 3080434005 at 2009-03-03 01:12:08 on Problem 2126
#include<iostream>

using namespace std;

int main()
{
	int n;
	while(1 == scanf("%d", &n) )
	{
		getchar();
		char ch[3002];
		if(n < 1)
		{
			gets(ch);
			puts("YES");
		}
		else if(n == 2)
		{
			int a, b, c;
			scanf("%d %d %d", &a, &b, &c);
			if(b * b >= 4 * a * c)
				puts("YES");
            else
                puts("NO");
		}
		else
		{
			gets(ch);
			puts("NO");
		}
	}
	return 0;
}1

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