摘要:
#include <stdio.h> #include <math.h> int main(){ int n; double x1,y1,x2,y2,dx,dy,dt; scanf("%d",&n); while(n--) { scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); dx=x1-x2; dy=y1-y2; dt=sqrt(dx*dx+dy*dy); printf("%.2f\n",dt); } return 0; } 阅读全文
摘要:
#include<stdio.h>int main(){ int a[11]; int n,i,count; scanf("%d",&n); while(n--) { for(count=i=0;i<=10;i++) scanf("%d",&a[i]); a[10]+=30; --i; while(i--) if(a[10]>=a[i]) count++; printf("%d\n",count); } return 0;} 阅读全文