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

怎么不对~

Posted by rainwhy at 2008-09-20 13:29:34 on Problem 2301
#include <stdio.h>
int main()
 {
 int a[100],b[100],n,i,j;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d %d",&a[i],&b[i]);
 }
 for(j=0;j<n;j++)
 {
  if(b[i]>=0&&a[j]>=b[j]&&(a[j]+b[j])>=0&&(a[i]+b[i])%2==0)
   {
         printf("%d %d\n",(a[j]+b[j])/2,(a[j]-b[j])/2);
   }
  else printf("impossible\n");
 }
 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