1 #include<stdio.h>
 2 #include<stdlib.h>
 3 #include<math.h> 
 4 int main()
 5 {
 6     int x0,x1,x2,y0,y1,y2;
 7     double s;
 8     while(scanf("%d%d%d%d%d%d",&x0,&y0,&x1,&y1,&x2,&y2))
 9     {
10         if(x0==0&&y0==0&&x1==0&&y1==0&&x2==0&&y2==0)   break;
11         s=((x1-x0)*(y2-y0)-(x2-x0)*(y1-y0))/2.0;//三角形面积s=1/2*向量AB与向量AC的叉乘的绝对值
12         if(s>=0)   //s>=0是逆时针顺序,正面积 
13         printf("0\n");
14         else
15         printf("1\n");
16     }
17     //system("pause");
18     return 0;
19 }

相关文章:

  • 2021-04-10
  • 2022-01-25
  • 2022-02-22
  • 2021-09-13
  • 2021-09-10
  • 2021-07-02
  • 2021-05-30
  • 2021-11-25
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2022-01-10
  • 2022-01-06
  • 2021-05-04
  • 2022-12-23
  • 2021-06-01
相关资源
相似解决方案