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 |
怎么不对~#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator